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

Pubblicato il: 15 dicembre 2020
sul canale di: 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...


In questa pagina del sito puoi guardare il video online Basic Javascript (107/111) | Use the parseInt Function with a Radix | freeCodeCamp della durata di ore minuti seconda in buona qualità , che l'utente ha caricato Stral Tech 15 dicembre 2020, condividi il link con amici e conoscenti, su youtube questo video è già stato visto 584 volte e gli è piaciuto 3 spettatori. Buona visione!