What does console.log("Hello, World!") do?
Anonymous Quiz
94%
Prints "Hello, World!" in console
4%
Shows an alert
0%
Does nothing
2%
Throws an error
How do you declare a JavaScript variable?
Anonymous Quiz
21%
var x;
4%
int x;
7%
let x=0
68%
Both A and C
What is the correct way to write a JS comment?
Anonymous Quiz
13%
<!-- comment -->
20%
// comment
10%
/* comment */
57%
Both B and C
Which of the following is a valid JS data type?
Anonymous Quiz
6%
String
4%
Number
10%
Boolean
80%
All of the above
What keyword is used to define a constant variable?
Anonymous Quiz
60%
const
8%
let
18%
var
14%
constant
How do you create a function in JS?
Anonymous Quiz
67%
function myFunc(){}
12%
func myFunc()
10%
def myFunc()
12%
function: myFunc()
Which operator is used for equality comparison?
Anonymous Quiz
10%
A)=
23%
B)==
2%
C) ===
65%
D) Both B and C
How do you write an alert in JS?
Anonymous Quiz
73%
A) alert("Hi!")
5%
B) msg("Hi!")
16%
C) console.log("Hi!")
5%
D) prompt("Hi!")
Which keyword declares a variable that can be reassigned?
Anonymous Quiz
10%
A) var
6%
B) const
10%
C) let
73%
D) Both A and C
What is the output of typeof 42?
Anonymous Quiz
81%
A) "number"
6%
B) "string"
8%
C) "boolean"
4%
D) "object"
😁2
What does console.log (true && false) return?
Anonymous Quiz
5%
A) true
75%
B) false
11%
C)0
9%
D) 1
How do you declare an array?
Anonymous Quiz
71%
A) var arr = [1,2,3];
12%
B) var arr = (1,2,3);
4%
C) var arr ={1,2,3};
12%
D) array arr = [1,2,3];
How do you access the first element of arr?
Anonymous Quiz
82%
A) arr[0]
8%
B) arr[1]
4%
C) arr.first
6%
D) arr[0,0]
❤1
What does CSS stand for?
Anonymous Quiz
9%
Computer Style Sheets
82%
Cascading Style Sheets
5%
Creative Style Syntax
5%
Colorful Style Sheets
Which CSS property is used to change the text color?
Anonymous Quiz
5%
text-style
19%
font-color
73%
color
3%
background-color