
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Check for Not Defined Variable in JavaScript
To check a variable is ‘undefined’, you need to check using the following. If the result is “false”, it means the variable is not defined. Here, the variable results in “True” −
Example
<html> <body> <script> var points = 100; if(points){ document.write("True"); }else{ document.write("False"); } </script> </body> </html>
Advertisements