[Go to site: main page, start]

0% found this document useful (0 votes)
8 views2 pages

JavaScript & DOM MCQ Quiz

The document consists of multiple-choice questions (MCQs) related to JavaScript and the Document Object Model (DOM). It covers topics such as data types in JavaScript, AJAX, DOM manipulation, event handling, and specific JavaScript functions. Each question provides four answer options, testing knowledge on fundamental concepts in web development.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

JavaScript & DOM MCQ Quiz

The document consists of multiple-choice questions (MCQs) related to JavaScript and the Document Object Model (DOM). It covers topics such as data types in JavaScript, AJAX, DOM manipulation, event handling, and specific JavaScript functions. Each question provides four answer options, testing knowledge on fundamental concepts in web development.

Translated by

ScribdTranslations
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

MCQ JS & DOM

What are the types of numbers defined in JavaScript?


Integer and Float.
Number.
Number and Double.
Number and Integer.

2. What does the acronym AJAX mean?


Advanced JavaScript with XMLHttpRequest.
Asynchronous JavaScript and XML.
JavaScript extensible.
Nothing, it's just a sequence of letters without any meaning.

3. What is the equivalent for a DOM tree node of [Link][1] (in


assuming that the requested node exists) ?
[Link]
[Link]
[Link]
[Link]

4. What syntax is correct for the init function to be called on loading


the page?
[Link] = init;
[Link] = init();
[Link]() = init;
[Link]() = init();

5. When does the 'load' event trigger for a page?


As soon as the browser starts receiving the HTML code.
When the HTML code has finished loading.
When the DOM tree was built.
When the DOM tree was built and all resources were loaded (images, ...).

6. What can be said about the innerHTML attribute?


It is an attribute that is not specified in the DOM, but is rather well supported by the
modern browsers.
It is an attribute specified in the DOM.
It is an attribute that is only supported by Internet Explorer.
It's an attribute that doesn't work on Fridays.
7. Can we access the comments of a (X)HTML document?
No, it is not possible.
Yes, with [Link]
Yes, with [Link] evaluated to 7
Yes, with Node.COMMENT_NODE

8. for(; ; ) { ... } What happens with this statement?


It is an infinite loop that can be stopped with a condition.
We obtain the value undefined
We obtain the null value
Nothing is happening! But I cheated to respond: I tried to do it!

Which of these codes will not display 3?


alert([Link](-4, 3));
var i = 3; alert(i++);
alert(parseInt("3"));
alert([Link](2.9));

You might also like