How to Convert a String to a Number in JavaScript
AboutCommentsNotes
How to Convert a String to a Number in JavaScript
Expand for more info
index.js
run
preview
console
const quantity = "12";
console.log(typeof quantity);

// Number()
// parseInt()
// parseFloat()
// +
// * 1
// / 1
// - 0
// ~~
// Math.floor()
// Math.ceil()
// Math.round()
Console
"string"
,
/index.html
-3:47