lundi 29 février 2016

javascript clarification for handling null values

Ok i have little section of javascript syntax and i am very confuse how null behaves. There is a lot of discussion about null values but i cant seem to figure out the problem! Please help me. Here is the script.

var jsonData = '<?php echo $jsonData;?>';


    if (jsonData)
    {           
        console.log('jsonData is '+ jsonData);// null or not this section is always executed! why?
    }else{
        ini(jsonData);
    }

I tried using '===', '!' operators but still not working as expected

Aucun commentaire:

Enregistrer un commentaire