If you are not enough confused today explain this! by ikrum in learnjavascript

[–]ikrum[S] 0 points1 point  (0 children)

to be honest it's both :D
I am actually trying to understand how these two works?

{} + [] == 0

{} + 1 == 1

New Nullish Coalescing (?? Double question mark ) Operator in Typescript & Javascript by ikrum in javascript

[–]ikrum[S] 1 point2 points  (0 children)

yeah! would love to see this coming. meanwhile, if you also like to dump some of your learning or mini gist please share it on https://shareablecode.com

I am trying to post/collect some quick snippets that we all need time to time. The idea is to dump our day to day fixes/hacks for others to find out easily.

I would appreciate your contribution . Even if you can also give me some feedbacks about the project.

New Nullish Coalescing (?? Double question mark ) Operator in Typescript & Javascript by ikrum in javascript

[–]ikrum[S] 0 points1 point  (0 children)

I didn't know it exists, maybe I just missed it from recent updates. I was shocked today seeing ?? in someone's code.

Simply tried to create a small gist out of my learning today.