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 8 pages
Exam (elaborations)

JAVASCRIPT CORE EXAM SET 2026.pdf 1. Document information

Document preview thumbnail
Preview 2 out of 8 pages

JAVASCRIPT CORE EXAM SET 1. Document information

Content preview

JAVASCRIPT CORE EXAM SET 2026/2027 QUESTIONS AND
SOLUTIONS RATED A+
✔✔10. How do you write a conditional statement for executing some statements only if
"i" is NOT equal to 5?
a) if (i != 5)
b) if =! 5 then
c) if (i <> 5)
d) if <>5 - ✔✔a) if (i != 5)

✔✔11. How many looping statements are there in JavaScript?
a) 2. The "for" loop, and the "while" loop
b) 4. The "for" loop, the "while" loop, the "do...while" loop, and the "loop...until" loop
c) 3. The "for" loop, the "while" loop, and the "do...while" loop
d) The "for" loop - ✔✔c) 3. The "for" loop, the "while" loop, and the "do...while" loop

✔✔12. How does a "for" loop start?
a) for (i = 0; i <= 5)
b) for (i = 0; i <= 5; i++)
c) for i = 1 to 5
d) for (i <= 5; i++) - ✔✔b) for (i = 0; i <= 5; i++)

✔✔13. How can you add a comment in a JavaScript?
a) //This is a comment
b) 'This is a comment
c) <!--This is a comment-->
d) #This is a comment - ✔✔a) //This is a comment

✔✔14. What is the correct JavaScript syntax to insert a comment that has more than
one line?
a) /*This comment has
more than one line*/
b) <!--This comment has
more than one line-->
c) //This comment has
more than one line//
d) ##This comment has
##more than one line - ✔✔a) /*This comment has
more than one line*/

✔✔15. What is the correct way to write a JavaScript array?
a) var txt = new Array(1:"tim",2:"kim",3:"jim")
b) var txt = new Array="tim","kim","jim"
c) var txt = new Array:1=("tim")2=("kim")3=("jim")

, d) var txt = new Array("tim","kim","jim") - ✔✔d) var txt = new Array("tim","kim","jim")

✔✔16. How do you round the number 7.25, to the nearest whole number?
a) Math.rnd(7.25)
b) round(7.25)
c) rnd(7.25)
d) Math.round(7.25) - ✔✔d) Math.round(7.25)

✔✔17. How do you find the largest number of 2 and 4?
a) Math.ceil(2,4)
b) Math.max(2,4)
c) ceil(2,4)
d) top(2,4) - ✔✔b) Math.max(2,4)

✔✔18. What is the correct JavaScript syntax for opening a new window called
"window2" ?
a) open.new("http://www.w3schools.com","window2")
b) new("http://www.w3schools.com","window2")
c) new.window("http://www.w3schools.com","window2")
d) window.open("http://www.w3schools.com","window2") - ✔✔d)
window.open("http://www.w3schools.com","window2")

✔✔19. How do you put a message in the browser's status bar?
a) statusbar = "put your message here"
b) window.status("put your message here")
c) window.status = "put your message here"
d) status("put your message here") - ✔✔c) window.status = "put your message here"

✔✔20. How do you find the client's browser name?
a) client.navName
b) navigator.appName
c) browser.name
d) Browser.value - ✔✔b) navigator.appName

✔✔21. What are the basic ways that people can become aware of your Web site?
a) URL is told by somebody.
b) The link is followed from another Web site.
c) Your site is listed in a search engine.
d) All of the above. - ✔✔d) All of the above.

✔✔22. What are the basic ways to provide hints for search engines?
a) Put keywords in the <TITLE> tag of the Web page.
b) Put keywords in the first few lines of the Web page.
c) Put keywords as many times as possible in the Web page.

Document information

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

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