Layer 06

Funzione isDefined() in javascript

https://www.etechs.it/programming/cfusion/parameterExists-Vs-isDefined.php, in javascripting questa funzione non esiste, esiste invece typeof, ecco la funzione:

function isDefined(object, variable) {
    return (typeof(eval(object)[variable]) != ‘undefined’);
  }

]]>

Nessun commento “Funzione isDefined() in javascript”