parseint javascript
var myInt = parseInt("10.256"); //10
var myFloat = parseFloat("10.256"); //10.256
koko
var myInt = parseInt("10.256"); //10
var myFloat = parseFloat("10.256"); //10.256
function convertToInterger(myString) {
return parseInt(myString, 2); // We convert this to base 2.
}
console.log(convertToInterger("10011")); // This is a binary number.
function convertToInteger(str) {
return parseInt(str);
}
convertToInteger("56");