const a = '23'; // string
const b = true; // boolean
//converting to number
const result1 = Number(a);
const result2 = Number(b);
console.log(result1); // 23
console.log(result2); // 1
let x = 3.14; // A number with decimals
let y = 3; // A number without decimals
const number1 = 3;
const number2 = 3.433;
const number3 = 3e5 // 3 * 10^5
var x = 3.14; // A number with decimals
var y = 3; // A number without decimals
Number(true);
Number(false);
Number("10");
Number(" 10");
Number("10 ");
Number(" 10 ");
Number("10.33");
Number("10,33");
Number("10 33");
Number("John");