lundi 19 novembre 2018

What does an if (number) return?

I seem to be having a hard time understanding what this does to my code?

const $counters = $('.js-item-counter')
if($counters.length)
{

}

What would this if statement return?

I can tell that the value is 1, but does this make sense?

I am trying to fix some frontend issues, and ran into something like this..

Aucun commentaire:

Enregistrer un commentaire