Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
Take
a = "a", b = "b"
as an exampleThe conditional statement will compare it like this (
"A" === "a" || "b" === "B"
). Clearly, both of them are not equal, so any alphabetical letters (a-z
andA-Z
) will not enter this part of the control flow statement. Whilst, if you compare any non-alphabetical letters, (~
/!
/?
), changing of casing does not affect them, so the condition will be as such:which will always evaluate to
true
, hence returning-1
Use spoiler flag next time please.
This comment is hidden because it contains spoiler information about the solution
0_0
WTF was that? XD
Hi, could you please explain how?
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution