mercredi 2 décembre 2015

javascript if Null check [duplicate]

This question already has an answer here:

I found this code in javascript tutorial. It reads if value is null the this.current is assigned to 0, otherwise to a value. How does it work? I am confused because there is no Null or ?? operator in the code.

this.current=value||0;

Aucun commentaire:

Enregistrer un commentaire