Basic Javascript (107/111) | Use the parseInt Function with a Radix | freeCodeCamp

Published: 15 December 2020
on channel: Stral Tech
584
3

Basic Javascript (107/111) | Use the parseInt Function with a Radix | freeCodeCamp

Full playlist 👉    • Basic JavaScript (1/111) | Comment Your Ja...  

"The parseInt() function parses a string and returns an integer. It takes a second argument for the radix, which specifies the base of the number in the string. The radix can be an integer between 2 and 36.

The function call looks like:

parseInt(string, radix);

And here's an example:

var a = parseInt("11", 2);

The radix variable says that "11" is in the binary system, or base 2. This example converts the string "11" to an integer 3.

Use parseInt() in the convertToInteger function so it converts a binary number to an integer and returns it."

https://www.freecodecamp.org/learn/ja...


On this page of the site you can watch the video online Basic Javascript (107/111) | Use the parseInt Function with a Radix | freeCodeCamp with a duration of hours minute second in good quality, which was uploaded by the user Stral Tech 15 December 2020, share the link with friends and acquaintances, this video has already been watched 584 times on youtube and it was liked by 3 viewers. Enjoy your viewing!