1. Which of these is a correct way to declare a variable in JavaScript?

Workshop Day 3

Quiz
•
arya thool
•
Professional Development
•
Professional Development
•
Hard
10 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
let x = 5;
variable x = 5;
x := 5;
var 5 = x;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which function is used to generate a random number in JavaScript?
Math.randomNumber();
Math.random();
random();
generateRandom();
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will this if statement do?
It will log "True"
It will log "False"
It will not log anything
It will throw an error
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can you create a simple function in JavaScript?
function myFunction() {}
create function myFunction() {}
func myFunction() {}
define myFunction() {}
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What does document.getElementById("id") do?
It changes the page title
It gets an element with the specified id
It creates a new element
It removes an element with the specified id
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these is used to trigger a function when a button is clicked in HTML?
onclick="functionName();"
onClick="functionName();"
click="functionName();"
buttonClick="functionName();"
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What will the following code display?
A random number between 0 and 1
A fixed number
A random number between 1 and 10
An error message
Explore all questions with a free account
Similar Resources on Quizizz
10 questions
Nodejs: Templating with EJS

Quiz
•
Professional Development
10 questions
Intro to Node.js

Quiz
•
Professional Development
10 questions
Cycle 1 - Session 4 Quiz - Algorithms...

Quiz
•
Professional Development
10 questions
React Basics Quiz

Quiz
•
Professional Development
10 questions
JavaScript 小測驗

Quiz
•
Professional Development
10 questions
Moringa JavaScript Arrays

Quiz
•
5th Grade - Professio...
10 questions
Unity Scripting Beginner (EN)

Quiz
•
12th Grade - Professi...
15 questions
Introduction to Nodejs

Quiz
•
Professional Development
Popular Resources on Quizizz
19 questions
Naming Polygons

Quiz
•
3rd Grade
14 questions
Prime Factorization

Quiz
•
6th Grade
20 questions
math review

Quiz
•
4th Grade
21 questions
6th Grade Math CAASPP Practice

Quiz
•
6th Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
35 questions
4th Grade Math SOL Review

Quiz
•
4th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade