dimanche 10 janvier 2016

javascript: one-line if vs &&

Is there any meaningful difference between

condition && console.log("this may run");

and

if (condition) console.log("this may run);

If not, which is a best practice?

Aucun commentaire:

Enregistrer un commentaire