1//It accepts two arguments.
2//The first argument is the string to convert.
3//The second argument is called the radix. This is the base number used in mathematical systems. For our use, it should always be 10.
4
5
6var text = '42px';
7var integer = parseInt(text, 10);
8
9
10// returns 42
1var text = '42px';
2var integer = parseInt(text, 10);
3// returns 42
4let myNumber = Number("5.25"); //5.25
1var myInt = parseInt("10.256"); //10
2var myFloat = parseFloat("10.256"); //10.256
1<script language="JavaScript" type="text/javascript">
2var a = "3.3445";
3var c = parseInt(a);
4alert(c);
5</script>