How to fix error showing in chrome console that showing undefined and not showing any problem in vs code ? | Sololearn: Learn to code for FREE!

-1

How to fix error showing in chrome console that showing undefined and not showing any problem in vs code ?

Not showing any problem In vs code and not showing output looks everything is fine Function add(){ {Console.log(argument.lenght);} } Add(2,3) The output should be 2 but it's showing undefined in the console

8/8/2022 8:04:07 AM

Mani Singh

8 Answers

New Answer

+2

F in function should be lowercase C in console should be lowercase lenght should be spelled as length Add should be called as add() not Add() I think this will fix the problem

+1

Oh ok thank you Will try that one Thank you once again

0

During typing in the by mistake I put uppercase for F and c but how about the add() I didn't get you

0

It's arguments (with 's' at end) Mirielle was telling you to match the function name. You defined add() but you call Add(), Remember JS is a case sensitive language, "add" and "Add" are not similar identifier...

0

lenght => length

0

I am comparing the equal sign only

0

I meant that you need to transform your misspelling of "lenght" to the correct spelling, "length".

-1

Sorry I didn't get you