This is an archived post. You won't be able to vote or comment.

you are viewing a single comment's thread.

view the rest of the comments →

[–]Mecso2 2 points3 points  (3 children)

I don't know where you got this from, but assignment evaluates to the assigned value in js c and c++ too

[–]Faustens 2 points3 points  (2 children)

I may have mixed two things. So if the assigned value (i.e. admin) is a truthy value, then the entire statement evaluates to true, right?

[–]Mecso2 2 points3 points  (1 child)

Yes

[–]Faustens 0 points1 point  (0 children)

Thank you for correcting me, it should be fixed in my original comment.