Ohhhh this is a straight up bad example. I would not ask a junior this.
Yes, tests knowledge, but this is not an example you're ever likely to see in a real application. Anyone using this code who's not a grad or an intern is going to get a talking to and some help.
Loose equality is just equality, you're thinking strict & non strict equality.
This sort of stuff is code from 10+ years ago.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Ohhhh this is a straight up bad example. I would not ask a junior this.
Yes, tests knowledge, but this is not an example you're ever likely to see in a real application. Anyone using this code who's not a grad or an intern is going to get a talking to and some help.
Loose equality is just equality, you're thinking strict & non strict equality.
This sort of stuff is code from 10+ years ago.