this post was submitted on 07 Sep 2023
29 points (69.9% liked)

Programmer Humor

32555 readers
636 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] lastunusedusername2@sh.itjust.works 59 points 1 year ago (5 children)

It looks like it's just assigning the scope variable m to true (also false in the m=!1 case.

It's minified code and m=!0 is fewer characters than m=true.

[–] Maven@lemmy.sdf.org 10 points 1 year ago (4 children)

Well I hate that. Is there a reason m=1 wouldn't be the same thing as m=!0?

[–] Hack3900@lemdit.com 40 points 1 year ago

Types are dynamic so I think the ! operator converts int to bool in JS

load more comments (3 replies)
load more comments (3 replies)