|
INTERVIEW QUESTIONS
WEB
JAVA SCRIPT
DETAILS
Question: What are the language's basic entities?
Answer: As in most object-oriented, event-driven programming languages, there are four distinct entities in JavaScript:
* OBJECTS. A discussion of objects is beyond the scope of this FAQ (see the section "Objects and the Web" in Intranet Journal's Intranet FAQ for background). It's impossible to understand JavaScript without knowing the following essentials, however: 1. everything you can control in a web browser is an object comprising properties and methods (sometimes referred to in the literature as attributes and operations, respectively) 2. properties define the state of an object; e.g., red text, 10-element array 3. methods define the actions that change the state of an object; e.g., fontcolor("red") sets the color of a text object to red.
* FUNCTIONS. Methods that operate outside of objects; e.g., escape() and unescape(), JavaScript functions that perform ASCII to hex conversions. The existence of non-object-specific functions in JavaScript keeps it from being a truly object-oriented language like Java.
* STATEMENTS. Programming commands that control object lifecycles and the flow of execution; e.g., if..else, while. JavaScript statements and syntax closely resemble those of the 'C' programming language.
* EVENTS. Things that happen, usually as a result of user actions, to which a JavaScript program can respond; e.g., a mouse click. Events always happen in relation to a given object, such as a button in a form (for which onClick is a typical event), or an entire web page (sample event: onLoad). The code that specifies what the object should do in response to an event is a special type of method called an event handler.
|
|
|
Category |
Java Script Interview Questions & Answers -
Exam Mode /
Learning Mode
|
Rating |
(0.2) By 9843 users |
Added on |
10/6/2012 4:45:36 AM |
Views |
69220 |
Rate it! |
|
|
Question:
What are the language's basic entities?
Answer:
As in most object-oriented, event-driven programming languages, there are four distinct entities in JavaScript:
* OBJECTS. A discussion of objects is beyond the scope of this FAQ (see the section "Objects and the Web" in Intranet Journal's Intranet FAQ for background). It's impossible to understand JavaScript without knowing the following essentials, however: 1. everything you can control in a web browser is an object comprising properties and methods (sometimes referred to in the literature as attributes and operations, respectively) 2. properties define the state of an object; e.g., red text, 10-element array 3. methods define the actions that change the state of an object; e.g., fontcolor("red") sets the color of a text object to red.
* FUNCTIONS. Methods that operate outside of objects; e.g., escape() and unescape(), JavaScript functions that perform ASCII to hex conversions. The existence of non-object-specific functions in JavaScript keeps it from being a truly object-oriented language like Java.
* STATEMENTS. Programming commands that control object lifecycles and the flow of execution; e.g., if..else, while. JavaScript statements and syntax closely resemble those of the 'C' programming language.
* EVENTS. Things that happen, usually as a result of user actions, to which a JavaScript program can respond; e.g., a mouse click. Events always happen in relation to a given object, such as a button in a form (for which onClick is a typical event), or an entire web page (sample event: onLoad). The code that specifies what the object should do in response to an event is a special type of method called an event handler. Source: CoolInterview.com
If you have the better answer, then send it to us. We will display your answer after the approval.
Rules to Post Answers in CoolInterview.com:-
- There should not be any Spelling Mistakes.
- There should not be any Gramatical Errors.
- Answers must not contain any bad words.
- Answers should not be the repeat of same answer, already approved.
- Answer should be complete in itself.
|
|
Related Questions |
View Answer |
|
Where is the official bug list for JavaScript?
|
View Answer
|
|
Where can I find online documentation for JavaScript?
|
View Answer
|
|
What is JavaScript?
|
View Answer
|
|
How i will use email validation in java script, Like. User can't enter invalid email address?
|
View Answer
|
|
What is the main difference between Client side Java Script and and Server side Java Script how actully they run on both side with Example
|
View Answer
|
|
I do not want to go next field without filling the text? Whic function i should use. Phone No Text validation in javascript
|
View Answer
|
Please Note: We keep on updating better answers to this site. In case you are looking for Jobs, Pls Click Here Vyoms.com - Best Freshers & Experienced Jobs Website.
View All Java Script Interview Questions & Answers - Exam Mode /
Learning Mode
|