Hi there, I am currently using the isNaN function to check if my variable is a string or an object. I just wondered if this is the wrong way of doing it because it does not seem to be working.
if(isNaN(element))
element = document.querySelector(element);
At the moment even if element is an object it is still causing isNaN to return true. Any ideas? I am sure I am missing something obvious. Is it that isNaN only works for a string/integer test?
Thanks in advance.