DEV Community


Discussion on: 17 Pro JavaScript tricks you didn't know

alicescfernandes profile image
Alice Fernandes
let num = 15;
let s = num + ""; // number to string
let n = +s; // string to number
Enter fullscreen mode Exit fullscreen mode

I don't believe that this is pro javascript. This is playing with types of js and praying that it doesn't break in the future. I believe that converting to other types should be explicit so that it becomes readable to other coders

rahxuls profile image
Rahul Author

Yea agree.