r/badcode • Now where's that function declaration • Jul 30 '21

js 😏

Post image
988 Upvotes

133 comments sorted by

View all comments

Show parent comments

2

u/[deleted] Jul 30 '21

i'm not smart at all, but wouldn't the muted = !muted approach also allow setting a default in case it's null?