Tag Archives: typeof in javascript

How to handle ‘undefined’ in javascript

Variable ‘mydata’ is returning the value ‘undefined’, if you give this in an if condition its not working.. if(mydata==”undefined”) this condition should not work.so below code will solve the issue.