
Test 1 - JavaScript

Quiz
•
Computers
•
University
•
Medium
Chadnie Ampalaya
Used 1+ times
FREE Resource
50 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A web developer wants to add interactivity to a webpage, such as making a button display an alert when clicked. Which programming language should they use?
HTML
CSS
JavaScript
SQL
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A company wants to create a dynamic website where users can interact with elements without reloading the page. What feature of JavaScript allows this?
Static Content Rendering
Client-Side Scripting
Relational Database Management
Cascading Style Sheets
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
An online store wants to display a pop-up message when a customer adds an item to their cart. Which JavaScript function can be used for this?
console.log("Item added!");
alert("Item added to cart!");
document.write("Item added!");
prompt("Item added to cart!");
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A developer wants to change the text of a paragraph when a user clicks a button. Which JavaScript method can they use?
document.getElementById("demo").innerHTML = "New text";
document.getElementById("demo").style.color = "red";
alert("New text");
console.log("New text");
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A business website wants to execute JavaScript code only when the webpage is fully loaded. Which event should be used?
onmouseover
onclick
onload
onkeydown
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A web developer wants to ensure that JavaScript is executed only after the HTML content is fully loaded. Where is the best place to place the <script> tag?
Inside the <head> section
At the beginning of the <body> section
At the end of the <body> section
Inside a <div> element
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
A company wants to separate JavaScript code from their HTML file for better organization and reusability. What is the best approach?
Write JavaScript inside the <body> section
Use the <script> tag inside the <head> section
Place JavaScript in an external .js file and link it using <script src="script.js"></script>
Use inline JavaScript within HTML elements
Create a free account and access millions of resources
Similar Resources on Wayground
53 questions
Windows-Administration-Security : Quiz 2

Quiz
•
University
50 questions
Kurikulum OBE & Profesi IT

Quiz
•
University
54 questions
Python тест

Quiz
•
University
46 questions
Web Programming 1 Final Exam

Quiz
•
University
50 questions
Тест айбек

Quiz
•
University
50 questions
Quiz Pengembangan Perangkat Lunak

Quiz
•
10th Grade - University
45 questions
Python

Quiz
•
University
50 questions
Software Testing Quiz

Quiz
•
University
Popular Resources on Wayground
10 questions
Lab Safety Procedures and Guidelines

Interactive video
•
6th - 10th Grade
10 questions
Nouns, nouns, nouns

Quiz
•
3rd Grade
10 questions
9/11 Experience and Reflections

Interactive video
•
10th - 12th Grade
25 questions
Multiplication Facts

Quiz
•
5th Grade
11 questions
All about me

Quiz
•
Professional Development
22 questions
Adding Integers

Quiz
•
6th Grade
15 questions
Subtracting Integers

Quiz
•
7th Grade
9 questions
Tips & Tricks

Lesson
•
6th - 8th Grade
Discover more resources for Computers
21 questions
Spanish-Speaking Countries

Quiz
•
6th Grade - University
20 questions
Levels of Measurements

Quiz
•
11th Grade - University
7 questions
Common and Proper Nouns

Interactive video
•
4th Grade - University
12 questions
Los numeros en español.

Lesson
•
6th Grade - University
7 questions
PC: Unit 1 Quiz Review

Quiz
•
11th Grade - University
7 questions
Supporting the Main Idea –Informational

Interactive video
•
4th Grade - University
12 questions
Hurricane or Tornado

Quiz
•
3rd Grade - University
7 questions
Enzymes (Updated)

Interactive video
•
11th Grade - University