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

JavaScript Test 2025 Questions and Answers

Rating
-
Sold
-
Pages
49
Grade
A+
Uploaded on
08-05-2025
Written in
2024/2025

JavaScript Test 2025 Questions and Answers

Institution
JAVA
Course
JAVA











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

Written for

Institution
JAVA
Course
JAVA

Document information

Uploaded on
May 8, 2025
Number of pages
49
Written in
2024/2025
Type
Exam (elaborations)
Contains
Questions & answers

Subjects

Content preview

JavaScript Test 2025 Questions and
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 - 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 - 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> - 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>"); - 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>" ); - 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.

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.
KatelynWhitman West Virginia University
View profile
Follow You need to be logged in order to follow users or courses
Sold
1084
Member since
2 year
Number of followers
482
Documents
33022
Last sold
5 hours ago
Golden Quill Emporium Store

Get Yourself Well-Researched Study Materials to Ace Your Online&amp; Actual Exam Tests with Confidence. STUDY LIKE A PRO WITH A WELL FORMATTED Q&amp;A MATERIALS.

3.6

235 reviews

5
94
4
38
3
54
2
20
1
29

Recently viewed by you

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