i should change argument === 1, 2, 3 and use: argument === 1 || argument === 2 || argument === 3?
That won’t work, but i’m unable to see the console after i finish the code. It ends on the last line and don’t show anything else. That’s why i asked here, i was thinking it was a bug or something. I’m trying to see on vsCode but i’m doing something wrong, because i’m also unable to see the result on the console.
Okay, just fingured, i was consoling inside the function, so wasn’t showing me.
So i guess argument === 1, 2, 3 means that slice will be false, a : 1 also false, NaN also false, “a” also false, and “true” or “false” also false because it isn’t a text?
no, the result of argument === 1, 2, 3 is 3, sorry, console.log was a bad thing to suggest here, unless you write it as console.log((argument === 1, 2, 3))
so it means it is always a truthy value, and everything that fails the first two checks of argument === false and argument === true, will pass a else if (3) {
My function isn’t checking the value properly? I understand that i should check them separately, using && or ||, but everytime i try the answer is “1, 2, 3 should return false”, so only when i check like “argument === 1, 2, 3” i have an accurate answer.
i tried to console.log how you did, but is saying ‘argument is not defined’.
i’m not sure what am i doing wrong here, thought i know i should use || to separate them because i’m probably not checking 2 and 3, but when i try to do it it i fail the exercise.
I did just to check and console.log(2) or 3 returns false, and also console.log(1, 2, 3) but i need to call the function, i can’t console.log(argument === 1) or anything cause argument is not defined. Am i doing something so wrong that the exercise is bugging?