• ¿Documento equivocado? Cámbialo gratis
  • Escrito por estudiantes que aprobaron
  • Inmediatamente disponible después del pago
  • Leer en línea o como PDF
Vender
¿Dónde estudias?
Tu idioma
Document preview thumbnail
Vista previa 2 fuera de 7 páginas
Examen

Javascript Practice Exam Questions And Answers All Correct

Document preview thumbnail
Vista previa 2 fuera de 7 páginas

JAVASCRIPT PRACTICE EXAM QUESTIONS AND ANSWERS ALL CORRECT

Vista previa del contenido

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;
}

Información del documento

Subido en
14 de julio de 2025
Número de páginas
7
Escrito en
2024/2025
Tipo
Examen
Contiene
Preguntas y respuestas
$13.99

¿Documento equivocado? Cámbialo gratis Dentro de los 14 días posteriores a la compra y antes de descargarlo, puedes elegir otro documento. Puedes gastar el importe de nuevo.
Escrito por estudiantes que aprobaron
Inmediatamente disponible después del pago
Leer en línea o como PDF

Seller avatar
Los indicadores de reputación están sujetos a la cantidad de artículos vendidos por una tarifa y las reseñas que ha recibido por esos documentos. Hay tres niveles: Bronce, Plata y Oro. Cuanto mayor reputación, más podrás confiar en la calidad del trabajo del vendedor.
Scholarsstudyguide
3.8
(169)
Vendido
853
Seguidores
476
Artículos
16409
Última venta
1 semana hace




Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes