Posted By

pablazo on 02/05/08


Tagged

javascript variables


Versions (?)

Who likes this?

2 people have marked this snippet as a favorite

adix
Morgano


function isDefined()


 / Published in: JavaScript
 

  1. //VersiĆ³n reducida (Gracias DN)
  2.  
  3. function isDefined( variable) { return (typeof(window[variable]) != "undefined");}
  4.  
  5.  
  6.  
  7. //Uso:
  8.  
  9. isDefined("nombre_variable");

Report this snippet  

You need to login to post a comment.