Java Script Interview Questions

1) What is Java Script?

JavaScript is a scripting language that can be inserted into HTML pages.
JavaScript code can be executed by all latest web browsers.

2) What is the DOM?

The Documentation Object Model is a World Wide Web Consortium standard.
The DOM defines a standard for accessing documents:
It has 3 different parts:
•    Core DOM – standard model for all document types
•    XML DOM – standard model for XML documents
•    HTML DOM – standard model for HTML documents

3) How declare variables in Java Script?

We declare variables using var keyword
Syntax:
var variablename;
Ex:
var cname;
cname= “test”;

 

Comments