Convert a string to integer/float using JS
Hey Guys
I found a neat trick to convert a string to an integer/decimal (with fixed values after decimal) using JavaScript.
Let's take a string containing a whole number.
let numberAsString = "234";
numberAsString = +numberAsString;
co...
abhishekgupta.hashnode.dev1 min read