Tag Archives: undefined value in javascript to handle if condition

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.