The toString() function accepts a single optional parameter base. The base parameter defines the base in which the integer is represented in the string.
The number.toString() function returns a string representing the specified Number object.
See the below code.
// app.js let a = 11; let b = 11.00; let c = 11.21; let d = 19; let opA = a.toString(2); let opB = b.toString(2); let opC = c.toString(2); let opD = d.toString(2); console.log(opA, typeof (opA)); console.log(opB, typeof (opB)); console.log(opC, typeof (opC)); console.log(opD, typeof (opD));
1011 string 1011 string 1011.00110101110000101000111101011100001010001111011 string 10011 string
📺 The video in this post was made by Programming with Mosh
The origin of the article: https://www.youtube.com/watch?v=09BwruU4kiY&list=PLTjRvDozrdlxEIuOBZkMAK5uiqp8rHUax&index=6
🔥 If you’re a beginner. I believe the article below will be useful to you ☞ What You Should Know Before Investing in Cryptocurrency - For Beginner
⭐ ⭐ ⭐The project is of interest to the community. Join to Get free ‘GEEK coin’ (GEEKCASH coin)!
☞ **-----CLICK HERE-----**⭐ ⭐ ⭐
Thanks for visiting and watching! Please don’t forget to leave a like, comment and share!
Does your business need an interactive website or app?
The technology used to develop the overall app by the developers from WebClues Infotech is at par with the latest available technology.
For more inquiry click here https://bit.ly/31eZyDZ
Book Free Interview: https://bit.ly/3dDShFg