Garantie de satisfaction à 100% Disponible immédiatement après paiement En ligne et en PDF Tu n'es attaché à rien 4,6 TrustPilot
logo-home
Examen

JavaScript Test UPDATED ACTUAL Exam Questions and CORRECT Answers

Note
-
Vendu
-
Pages
33
Grade
A+
Publié le
17-04-2025
Écrit en
2024/2025

JavaScript Test UPDATED ACTUAL Exam Questions and CORRECT Answers 6.1 In the following line the word document is a(n) ______ that resides in the computer's memory. ln("Hello World"); a) attribute b) behavior c) object d) method - CORRECT ANSWER - c) Object

Montrer plus Lire moins
Établissement
JAVA
Cours
JAVA

Aperçu du contenu

JavaScript Test UPDATED ACTUAL Exam
Questions and CORRECT Answers
6.1 In the following line the word document is a(n) ______ that resides in the computer's
memory.
document.writeln("Hello World");
a) attribute
b) behavior
c) object

d) method - CORRECT ANSWER - c) Object


6.2 In the following line, the word writeln is a(n) _________ that performs a task or action in the
script.
document.writeln("Hello World");
a) structure
b) collection
c) object

d) method - CORRECT ANSWER - d) Method


6.3 Consider the following HTML5 code.
<html>
<script type = "text/javascript">
<!--
<!-- document.writeln("Hello World"); -->
//-->
</script>
</html>


What would a browser capable of scripting display when executing this code?

,a) document.writeln("Hello World");
b) nothing
c) Hello World
d) <html>
<script type = "text/javascript">
<!--
<!-- document.writeln("Hello World </p>");
//-->
</script>

</html> - CORRECT ANSWER - b) Nothing


6.4 Which of the following statements would correctly print out the sentence "Hello World" in
blue?
a) document.write( "<p style = \"color: blue\");
document.write( "Hello World >");
b) document.write( "<p> style = \"color: blue\" Hello World </p>);
c) document.write( "<p style = \"color: blue\" Hello World + "</p>");
d) document.write( "<p style = \"color: blue\">");

document.write( "Hello World </p>"); - CORRECT ANSWER - d) document.write( "<p
style = \"color: blue\">");
document.write( "Hello World </p>");


6.5 An alert dialog displaying the text "Welcome!" is created by calling _________.
a) window.alert( "Welcome!" );
b) alert.window( "Welcome!" );
c) window( "alert = \"Welcome!\"" );

d) window( "<alert> Welcome! </alert>" ); - CORRECT ANSWER - a) window.alert(
"Welcome!" );

,6.6 Consider the following script. What is wrong with the following code?
<script type = "text/javascript">
var firstNumber;
thirdNumber;


firstNumber = window.prompt("Enter an integer", "0");
secondNumber = window.prompt("Enter an integer", "0");
thirdNumber = firstNumber + secondNumber;
</script>


a) thirdNumber in line 7 must be in quotes.
b) The words Enter an integer in line 6 should not be in quotes.
c) The word thirdnumber in line 3 should have a comma after it.

d) The word var must be placed before thirdNumber in line 3. - CORRECT ANSWER - d)
The word var must be placed before thirdNumber in line 3.


6.7 Which of the following is not a valid variable name?
a) Tax1
b) eightball_8
c) 12footage

d) pageNumber1200 - CORRECT ANSWER - c) 12footage


6.8 What will the browser display if the following script is executed and the user enters 5 at both
prompts?
<script type = "text/javascript">
<!--
var firstNumber = window.prompt( "Enter an integer", "0" );
var secondNumber= window.prompt( "Enter an integer", "0" );
var thirdNumber;

, thirdNumber = firstNumber + secondNumber;
document.write( thirdNumber );
//-->
</script>


a) nothing
b) 0
c) 10

d) 55 - CORRECT ANSWER - d) 55


6.9 Whenever a value is placed in a memory location, the value________.
a) cannot be added if a value already exists
b) can share a location in memory with another value
c) replaces the previous value in that location

d) will be assigned to another identifier if a value already exists - CORRECT ANSWER -
c) replaces the previous value in that location


6.10 What is the result of the statement 17 % 5?
a) 0
b) 2
c) 3

d) 12 - CORRECT ANSWER - b) 2


6.11 Which of the following sequences does not follow the rules of operator precedence?
Assume that operators are evaluated in the order listed from left to right.
a) multiplication, division, addition
b) parentheses, subtraction, modulus
c) division, multiplication, addition

École, étude et sujet

Établissement
JAVA
Cours
JAVA

Infos sur le Document

Publié le
17 avril 2025
Nombre de pages
33
Écrit en
2024/2025
Type
Examen
Contient
Questions et réponses

Sujets

€11,67
Accéder à l'intégralité du document:

Garantie de satisfaction à 100%
Disponible immédiatement après paiement
En ligne et en PDF
Tu n'es attaché à rien


Document également disponible en groupe

Faites connaissance avec le vendeur

Seller avatar
Les scores de réputation sont basés sur le nombre de documents qu'un vendeur a vendus contre paiement ainsi que sur les avis qu'il a reçu pour ces documents. Il y a trois niveaux: Bronze, Argent et Or. Plus la réputation est bonne, plus vous pouvez faire confiance sur la qualité du travail des vendeurs.
MGRADES Stanford University
S'abonner Vous devez être connecté afin de suivre les étudiants ou les cours
Vendu
1247
Membre depuis
2 année
Nombre de followers
103
Documents
72988
Dernière vente
15 heures de cela
MGRADES (Genius Brains)

Welcome to MGRADES Exams, practices and Study materials The work speaks for itself Me and my team will always make sure you get the best value from the exams markets. I offer the best study and exam materials for a wide range of courses and units. Make your study sessions more efficient and effective. Dive in and discover all you need to excel in your academic journey!

3,8

197 revues

5
84
4
35
3
50
2
10
1
18

Documents populaires

Récemment consulté par vous

Pourquoi les étudiants choisissent Stuvia

Créé par d'autres étudiants, vérifié par les avis

Une qualité sur laquelle compter : rédigé par des étudiants qui ont réussi et évalué par d'autres qui ont utilisé ce document.

Le document ne convient pas ? Choisis un autre document

Aucun souci ! Tu peux sélectionner directement un autre document qui correspond mieux à ce que tu cherches.

Paye comme tu veux, apprends aussitôt

Aucun abonnement, aucun engagement. Paye selon tes habitudes par carte de crédit et télécharge ton document PDF instantanément.

Student with book image

“Acheté, téléchargé et réussi. C'est aussi simple que ça.”

Alisha Student

Foire aux questions