これは知りませんでした...
let a = -1 * 0
console.log(a) // -0
console.log(Math.max(a)) // -0
console.log(parseInt(Math.max(a))) // 0
いくつか参考URLを貼っておきます
Why JavaScript has two zeros: -0 and +0
Are +0 and -0 the same?
Go to list of users who liked
More than 5 years have passed since last update.
これは知りませんでした...
let a = -1 * 0
console.log(a) // -0
console.log(Math.max(a)) // -0
console.log(parseInt(Math.max(a))) // 0
いくつか参考URLを貼っておきます
Why JavaScript has two zeros: -0 and +0
Are +0 and -0 the same?
Register as a new user and use Qiita more conveniently
Go to list of users who liked