• Wrong document? Swap it for free
  • Written by students who passed
  • Immediately available after payment
  • Read online or as PDF
Sell
Where do you study
Your language
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

Javascript Exam With 100% Correct Answers

Document preview thumbnail
Preview 2 out of 6 pages

JAVASCRIPT EXAM WITH 100% CORRECT ANSWERS

Content preview

JAVASCRIPT EXAM WITH 100%
CORRECT ANSWERS

Which of the following is not a valid operator?
A. +=
B. ==
C. ++
D. =+
E. -- - Answer-D

What value is returned by 9 % 5? - Answer-4

What is the difference between == and === ?
A. The == operator only checks for equivalent values, not equivalent type too.
B. The == operator is the assignment operator, while === is the equality operator.
C. The === operator only checks for equivalent values, not equivalent type too. -
Answer-A

What is the logical operator for AND? - Answer-&&

JavaScript code must be placed in the <head> section of the document. ( T/F ) -
Answer-F

Which tag is used to let the browser know that it is about to see JavaScript code?
A. script
B. head
C. js - Answer-A

Which is the correct syntax to change the contents of the HTML element below?

<p id = "quiz">This is a quiz. </p>

A. document.getElementById('quiz').innerHTML ="New content!!";
B. #quiz.innerHTML="New content!!";
C. document.getElementsByTagName('p').innerHTML ="New content!!";
D. quiz.innerHTML="New content!"; - Answer-A

Where can you put JavaScript?
A) In the <head> section
B) In the <body> section

, C) In an external file
D) In B) and C) above
E) In A), B) and C) above - Answer-E

Which attribute is used to link to an external JavaScript file?
A. href; e.g., href = "extFile.js"
B. src; e.g., src = "extFile.js"
C. file; e.g., file = "extFile.js"
D. script; e.g., script = "extFile.js" - Answer-B

Which word is used to define a function in JavaScript?
A. function
B. func
C. define - Answer-A

Which of the following best defines the relationship between defining a function and
calling a function?
A. A function can be defined multiple times in a single file
B. A function can be called multiple times in a single file. - Answer-B


Every valid web page can be represented as a tree. This tree is referred to as the
A. JavaScript
B. API
C. DOM - Answer-C

JavaScript uses what kind of interface to access the DOM structure?
A. CSS3
B. an API
C. HTML5 - Answer-B

Which of these is not valid? (Hint, pay attention to if the method should return one thing,
or many things...)
A. document.getElementsByTagName(tagName)
B. document.getElementsByClassName(className)
C. document.getElementsById(idName) - Answer-C

Which of the following is not a valid method for generating output to the screen?
A. document.write
B. print
C. alert
D. prompt - Answer-B

Which of these options does NOT require the use of parentheses?
A. console.log
B. prompt
C. alert

Document information

Uploaded on
July 14, 2025
Number of pages
6
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers
$13.49

Wrong document? Swap it for free Within 14 days of purchase and before downloading, you can choose a different document. You can simply spend the amount again.
Written by students who passed
Immediately available after payment
Read online or as PDF

Seller avatar
Reputation scores are based on the amount of documents a seller has sold for a fee and the reviews they have received for those documents. There are three levels: Bronze, Silver and Gold. The better the reputation, the more your can rely on the quality of the sellers work.
Scholarsstudyguide
3.8
(169)
Sold
853
Followers
476
Items
16410
Last sold
1 week ago




Why students choose Stuvia

Created by fellow students, verified by reviews

Quality you can trust: written by students who passed their tests and reviewed by others who've used these notes.

Didn't get what you expected? Choose another document

No worries! You can instantly pick a different document that better fits what you're looking for.

Pay as you like, start learning right away

No subscription, no commitments. Pay the way you're used to via credit card and download your PDF document instantly.

Student with book image

“Bought, downloaded, and aced it. It really can be that simple.”

Alisha Student

Working on your references?

Create accurate citations in APA, MLA and Harvard with our free citation generator.

Working on your references?

Frequently asked questions