Here is my code:
let num = 0.0134;
console.log(num.toString().split('').splice(3).splice(1, 0, '.'))
The console.log returns an empty array.
I want it to return ‘1.34’. What am I doing wrong?
Blancer.com Tutorials and projects
Freelance Projects, Design and Programming Tutorials
Here is my code:
let num = 0.0134;
console.log(num.toString().split('').splice(3).splice(1, 0, '.'))
The console.log returns an empty array.
I want it to return ‘1.34’. What am I doing wrong?