InterviewSolution
Saved Bookmarks
| 1. |
What are Symbol primitive type in JavaScript? |
|
Answer» null (var null) In JavaScript, null is a RESERVED identifier, therefore we cannot use it as an identifier in JavaScript. An error can be seen if we will write: <html> <body> <script> var null; </script> </body> </html>The following is the error VISIBLE when you will press F12 on browser: SYNTAXERROR: Unexpected token nullThe web browser throws an error for “var null” since it is a reserved identifier. UNDEFINED (var undefined) Even if it is undefined, let us see what would be the output: Undefined |
|