Written by students who passed Immediately available after payment Read online or as PDF Wrong document? Swap it for free 4.6 TrustPilot
logo-home
Document preview thumbnail
Preview 2 out of 6 pages
Exam (elaborations)

JAVASCRIPT MAIN EXAM MANUAL 2026.pdf

Document preview thumbnail
Preview 2 out of 6 pages

JAVASCRIPT MAIN EXAM MANUAL

Content preview

JAVASCRIPT MAIN EXAM MANUAL 2026/2027 QUESTIONS
AND SOLUTIONS RATED A+
✔✔Which of these options does NOT require the use of parentheses?
A. console.log
B. prompt
C. alert
D. document.write
E. innerHTML - ✔✔E

✔✔Which of the following does not generate output directly to the screen?
A. console.log(message);
B. document.write(message);
C. element.innerHTML = message; - ✔✔A

✔✔How does prompt differ from alert?
A. Only alert uses parentheses.
B. The alert will return a value, prompt does not.
C. Only prompt uses parentheses.
D. The prompt will return a value, alert does not. - ✔✔D

✔✔Variables allow you to save data. ( T/F ) - ✔✔T

✔✔In JavaScript the keyword ___________ is used to declare a variable. - ✔✔var

✔✔What does it mean that variables are case-sensitive?
A. That all variables must use uppercase letters
B. That all variables must use lowercase letters
C. That the computer does not think that the variables name and Name are the same
thing. - ✔✔C

✔✔Which of the following is not a valid variable name?
A. variableOne
B. oneVariable
C. variable1
D. 1variable - ✔✔D

✔✔Which of the following is not a valid variable name?
A. variable-2
B. variable_2
C. variable$2 - ✔✔A

✔✔What does mnemonic mean?
A. That variable names should help describe the value being stored.

, B. That variable names should be as short as possible, preferably with no more than
two or three characters.
C. That variable names should start with lowercase letters and use uppercase letters if
the variable has multiple parts, e.g. firstName. - ✔✔A

✔✔What is wrong with this code?

var name = "Mike";
"Colleen" = name;

A. It is illegal to change the value stored in a variable
B. This code is illegal and it doesn't make sense to have a non-variable ( also called a
constant) in the left-hand side (LHS) of an assignment statement
C. The variable declaration is illegal - ✔✔B

✔✔What value is stored in name if the person hits the Cancel button on a prompt?

var name = prompt("What is your name?"); - ✔✔null

✔✔What value is stored in name if the person hits the Okay button on a prompt before
entering anything?

var name = prompt("What is your name?");

A. an empty string("")
B. undefined
C. exception - ✔✔A

✔✔To create a String variable, use quotes around the value you want to save. ( T/F ) -
✔✔T

✔✔Boolean variables store either true or false. ( T/ F) - ✔✔T

✔✔When a function returns a node from the DOM, it is of type
A. Number
B. Object
C. String
D. Boolean - ✔✔B

✔✔A function that wants to return multiple values at once (such as
document.getElementsByTagName) will return a/an
A. Number
B. Array
C. String - ✔✔B

Document information

Uploaded on
July 20, 2026
Number of pages
6
Written in
2025/2026
Type
Exam (elaborations)
Contains
Questions & answers
£13.84

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.
BOARDWALK
3.5
(41)
Sold
287
Followers
11
Items
36005
Last sold
5 days ago



Why students choose Stuvia

Created by fellow students, verified by reviews

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

Didn't get what you expected? Choose another document

No problem! You can straightaway pick a different document that better suits what you're after.

Pay as you like, start learning straight 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 smashed 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