Created
March 22, 2023 13:13
-
-
Save periakteon/434c18c4ffe3dd362b42424fa76ad730 to your computer and use it in GitHub Desktop.
FreeCodeCamp: Use the parseInt Function (Solution)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function convertToInteger(str) { | |
const parsedStr = parseInt(str); | |
return parsedStr; | |
} | |
console.log(convertToInteger("56")); | |
// 56 | |
/* | |
Bu kodu aynı zamanda şöyle de yazabilirdik: | |
function convertToInteger(str) { | |
return parseInt(str); | |
} | |
convertToInteger("35"); | |
// 35 | |
*/ |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment