I think it may be best if you go back and start the curriculum javascript section over again. You can also read this link, it may clear things up for you:
There’s no point in me giving you the answer directly because you will get stuck in future challenges. If you do want the answer anyway, just ask and I post here for you.
function convertToInteger(str) {
var a = parseInt("56","77","JamesBond");
return 56 + 1,56;
if else{ return 77 + 1 , 77 ;}
return Nan ;
}
convertToInteger("56");
Your browser information:
User Agent is: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_13_4) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/69.0.3497.100 Safari/537.36.
All this challenge wants you to do is take the argument str and return it as an integer.
You don’t need any if / else statements, or to hard code any values like 56, 77, or James Bond.
You’ve been told in the instructions that parseInt converts a valid numerical string to an integer - that is the only tool you need for this challenge.
function convertToInteger(str) {
var a = parseInt(“JamesBond”);
return NaN ;
}
convertToInteger(“56”);
now can u plz solve this type of questions … so that i can pass this lesson … plz help … i am hanging on this being on several hours … i got tired on this question
Why did you start a new thread for the exact same problem? It might be best practice to delete this thread and repost in the original thread. You can then say what you are not understanding
Well, you want an integer, as in a “normal” counting number, yes? What is the “base” of standard Western arithmetic? Binary is “base 2”, Octal is “base 8”, Hexadecimal is “base 16”, and Decimal is “base ??”
Yes but people were suggesting what you should do in your other thread. Now they cant respond because you opened a new thread. So try to explain what don’t you understand. and what have you tried. Also did you watch that video in the other thread or look up redax on google or what does base pair mean? @snowmonkey gave a good hint above.