100% satisfaction guarantee Immediately available after payment Both online and in PDF No strings attached 4.2 TrustPilot
logo-home
Exam (elaborations)

JAVASCRIPT PRACTICE EXAM QUESTIONS AND ANSWERS ALL CORRECT

Rating
-
Sold
-
Pages
7
Grade
A+
Uploaded on
14-07-2025
Written in
2024/2025

JAVASCRIPT PRACTICE EXAM QUESTIONS AND ANSWERS ALL CORRECT

Institution
JAVASCRIPT
Course
JAVASCRIPT









Whoops! We can’t load your doc right now. Try again or contact support.

Written for

Institution
JAVASCRIPT
Course
JAVASCRIPT

Document information

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

Subjects

Content preview

JAVASCRIPT PRACTICE EXAM
QUESTIONS AND ANSWERS ALL
CORRECT

How does a reference type name differ from that of a variable? - Answer-A reference
type name starts with an upper case letter

What does the "this" keyword refer to? - Answer-The "this" keyword refers to the object
instance of the reference type

What is the advantage of using "get" and "set" property definitions? - Answer-Since
JavaScript automatically creates objects, if you misspell a property name, a new
property can be created. Creating the set and get property methods prevents this issue


What is the top level of the BOM and what is its purpose - Answer-The window object
which represents the frame of the browser. Everything associated with it including the
scroll bars, navigator bar icons and so on.

What represents the page in the BOM - Answer-The document object

What can you do from the windows object - Answer-- determine the browser
- determine the pages visited
- size of the user's screen
- change text in browser status bar
- change page that is loaded
- open new windows

Which object is the global object - Answer-- the windows object is the global object
- you can access it's properties from anywhere in the web page
- you do not need to use the windows. to access the properties and methods

How can you tell the difference between a property and a method? - Answer-The
method ends with ()

List Windows objects common to all browsers and their scope - Answer-- document - all
elements and objects on a page

, - three collections - links, images, forms
- navigator - information about the browser & OS
- screen - display capabilities
- location - current page's location
- history - all pages the user has visited


What is the syntax to reference an external JavaScript file? - Answer-<script type =
"text/javascript" src="filename.js"></script>

What is the syntax of an if statement - Answer-var myVariable;
if (myVariable == 1)
{
do something
}

What are the main collections of the document object - Answer-forms, images and links

Name some of the events for a web page - Answer-onload, onunload, links[0].onclick

What do you return if you want an onclick event not to go through - Answer-return true;

what are two ways to connect an onclick event to a hyperlink? - Answer-1) add an
onclick tag inside the "a href" tag
2) add window.document.link[0].onclick = <function>

How do you throw and catch an exception - Answer-try
{throw exception;}
catch(exception){alert("here is the error");}

does JavaScript have classes? - Answer-No, JavaScript has an equivalent named a
reference type.

What three things does a reference type consist of? - Answer-- Constructor
- Method Definitions
- Properties

write out a constructor containing the following parameters - Answer-function
CustomerBooking (bookingId, customerName, film, showDate)
{
this.customerName = customerName;
this.bookingId = bookingId;
this.showDate = showDate;
this.film = film;
}

Get to know the seller

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 nursing
View profile
Follow You need to be logged in order to follow users or courses
Sold
780
Member since
3 year
Number of followers
475
Documents
15129
Last sold
2 days ago
NURSING

Here you will find everything you need in nursing Assignments, EXAMS AND TESTBANKS. For students who want to see results twice as fast. I strive for my content to be of the highest quality. Always leave a review after purchasing any document so as to make sure our customers are 100% satisfied.

3.9

163 reviews

5
87
4
21
3
25
2
6
1
24

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

Frequently asked questions