Number.isNaN
toFixed
new Date
小数点以下の桁数を固定した文字列を返します。
(number).toFixed(digits)
下記の値を入力するとサンプルに即時反映されます。
const
console
const pi = 3.14159265; console.log(pi.toFixed(2)); // "3.14" console.log(pi.toFixed(4)); // "3.1416"