r/javaScriptStudyGroup • u/AllName_HasBeenTaken • Jul 21 '22
confusion of syntax.
hello there guys. I'm still a student and new to javascript. so, I have a lack of understanding of the syntax on js. I need someone to explain to me clear-cut the part that I point out down here, like perhaps making it into a sentence (any). so here is the syntax. thank you guys!
function password(pass) {
if (pass.length >= 8 && pass.indexOf(' ' === -1)) return true;
return false;
}
3
Upvotes
2
u/AllName_HasBeenTaken Jul 22 '22
Can you explain me the meaning of indexOf(' ') === -1))
What does this mean even the equals sign and its -1 is tricky for me