Log in
New Activity
Types of activities
Support center
Enter your Game Pin
Blog
Premium
English
Español
Français
New Activity
Log in
All the activities
Play Froggy Jumps
Print Froggy Jumps
JavaScript Basics
Author :
lexus washington
1.
What is the correct way to declare a variable that you can change?
A
let myName = 'Sloan';
B
const myName = 'Sloan';
C
variable myName = 'Sloan';
2.
What two values are considered boolean types?
A
'true' 'false'
B
true false
C
TRUE FALSE
3.
What is the correct way to generate a random number?
A
math.Random()
B
Number.random()
C
Math.random()
4.
Which of the following lines of code capitalizes every letter in the string `'codecademy'`.
A
'codecademy'.toCaps();
B
'codecademy'.toUpperCase();
C
'codecademy'.toUpperCase;
5.
Are variables case sensitive in javascript?
A
Yes
B
No
C
None of the above
6.
How do you add two numeric values in Javascript?
A
5 + 5
B
"5 + 5"
C
"5" + "5"
7.
How do you do one line comments in javascript ?
A
// enter comment here // enter comment2 here
B
/enter comment here /enter comment2 here
C
/* enter comment here /* enter comment2 here
8.
What Is JavaScript?
A
JavaScript (or simply JS) is the programming language of the client browser.
B
JavaScript (or simply JS) is the programming language of the web browser.
C
JavaScript (or simply JS) is the programming language of server side scripting
9.
What date type does a variable value have if you do not assign a value?
A
none
B
2
C
undefined
10.
What's the code to print in the browser's console?
A
console.ln("Hello world");
B
console.log("Hello world");
C
print.log("Hello world");