Hi these are some pills(little conceptional parts) that you can use daily bases of your programmer's life.
So i compill all of Strings to Numbers and Numbers to Strings functions and proprieties that we can use for it in javascript language.
_Strings_to Numbers
- First pill use String() :
let number="55 86 4232 5267"; console.log("My cellphone number is" + String(number));
- Second pill use .toString() ::
let number="55 86 4232 5267"; console.log("my cellphone number is" + number.toString());
Numbers to String
- Thirth pill use Number:
let width = "90"; let height = "25"; console.log(Number(width) * Number(height));
- Fourth pill use +
let width = "9000"; let height = "80"; console.log( + width * + height);
happy coding!! :))
Top comments (0)