Expert Developer JavaScript Question:

Download Job Interview Questions and Answers PDF

Why is object naming important to use in JavaScript?

Expert JavaScript Developer Interview Question
Expert JavaScript Developer Interview Question

Answer:

- Object naming is used to create script references to objects while assigning names to every scriptable object in the HTML code. The browsers that are script compatible looks for the optional tags and attributes that enables the assigning of a unique name to each object. The example is :
<form name="dataEntry" method=get>
<input type="text" name="entry">
<frame src="info.html" name="main">
- The names act as a nametags through which the elements can be easily identified and easily located by the browsers. The references made for each object includes the object hierarchy from the top down. References are used to include names of each object that are coming in the window object. The object naming conventions are easy way to loacte the objects and the linking between them can be done more comfortably.

Download Expert JavaScript Developer Interview Questions And Answers PDF

Previous QuestionNext Question
How can JavaScript language be separated from objects?How can I request data from the server without reloading the page in the browser?