vendredi 20 novembre 2020

jQuery: Expected an assignment or function call an instead saw an expression for an ifelse shortstatement?

In my Komodo IDE i get a warning message

"Expected an assignment or function call an instead saw an expression"

for this line:

data.aktiv == '1' ? $('#aktiv').attr('checked', 'checked') : $('#aktiv').attr('checked', false);

and for this line

 $('#aktiv').isCheck() ?  aktiv = 1 : aktiv = 0;

What is here the problem?




Aucun commentaire:

Enregistrer un commentaire