Exploring Number methods in detail || toString() || toPrecision() || toExponential() || toFixed()

Опубликовано: 17 Май 2026
на канале: Star Technophile
105
5

Hi star Technophile ,
This is a very Important video regarding a number methods , Here i have mention intuitive understanding regarding number functions .

Here is the list some example :
👉 toString()

example : let x = 10
let num = x.toString()
console.log(num) // 10


👉 toExponential()
example :
let x = 456.789
let num = x.toExponential()
console.log(num) // Output: 4.56789e+2

👉 toFixed()
example :
var num = 1.23e+2;
console.log(num.toFixed());

👉toPrecision()
example :
var num = 456.789;
console.log(num.toPrecision()) // Output : 456.789
console.log(num.toPrecision(2)) // Output : 4.6


These are very simple examples , Just practice them on a console you will get a huge understanding and confidence after doing all these function