What is the correct way of declaring a variable and assigning it to the value 10 ?
Javascript - var, functions, arrays, if

Quiz
•
Computers
•
12th Grade
•
Easy
Emmanuelle Arroyo
Used 2+ times
FREE Resource
14 questions
Show all answers
1.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
var a=10;
variable a:10;
var a:10;
var 10;
2.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the correct syntax to declare a function named myFun ?
myFun(){
}
function myFun{
}
function myFun(){
}
function myFun(
)
3.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
What is the purpose of creating functions?
to test a condition
to repeat some lines of code over and over
to execute some lines of code whenever you want
to execute lines of code when the page loads
4.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How can we change the text of a paragraph with an id "myPara"?
document.getElementById("myPara").style.text="new text"
document.getElementById("myPara").text="new text"
document.getElementById("myPara").innerHTML="new text"
document.getElementById("myPara").value="new text"
5.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
Which of these correctly selects a paragraph with an id "myPara"?
getElementById("myPara")
document.getElementById("myPara")
document.getElementById( myPara )
document.Id("myPara")
6.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do we execute a function named myFunction?
myFunction{};
myFunction();
function myFunction()
myFunction;
7.
MULTIPLE CHOICE QUESTION
30 sec • 1 pt
How do we create an array "myArray "of 2 items "one" and "two"?
var myArray = ["one", "two"]
var myArray = [one, two]
array myArray = ["one", "two"]
myArray = "one", "two"
Create a free account and access millions of resources
Similar Resources on Quizizz
13 questions
BE METER REVIEW #4

Quiz
•
12th Grade
10 questions
Java Script

Quiz
•
10th - 12th Grade
16 questions
Python basics

Quiz
•
9th - 12th Grade
10 questions
Arrays Javascript (CodeCademy)

Quiz
•
9th - 12th Grade
15 questions
Linux-2 Quiz 2 -- LAMP

Quiz
•
1st - 12th Grade
12 questions
C++ References

Quiz
•
6th - 12th Grade
15 questions
Javascript

Quiz
•
10th - 12th Grade
16 questions
ka react.js

Quiz
•
12th Grade
Popular Resources on Quizizz
15 questions
Character Analysis

Quiz
•
4th Grade
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
10 questions
American Flag

Quiz
•
1st - 2nd Grade
20 questions
Reading Comprehension

Quiz
•
5th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
18 questions
Full S.T.E.A.M. Ahead Summer Academy Pre-Test 24-25

Quiz
•
5th Grade
14 questions
Misplaced and Dangling Modifiers

Quiz
•
6th - 8th Grade
Discover more resources for Computers
17 questions
Chapter 12 - Doing the Right Thing

Quiz
•
9th - 12th Grade
30 questions
Linear Inequalities

Quiz
•
9th - 12th Grade
20 questions
Types of Credit

Quiz
•
9th - 12th Grade
20 questions
Taxes

Quiz
•
9th - 12th Grade
17 questions
Parts of Speech

Quiz
•
7th - 12th Grade
20 questions
Chapter 3 - Making a Good Impression

Quiz
•
9th - 12th Grade
20 questions
Inequalities Graphing

Quiz
•
9th - 12th Grade
10 questions
Identifying equations

Quiz
•
KG - University