Quiz
Javascript Variables
Create a free account to finish this quiz
Save your progress and see your final score.
Already have an account? Sign in
Questions in this quiz (8)
1Which of these variables are not valid in Javascript?
- A4_colors
- BColor
- Ccolor
- D$color
2What happens when you declare a variable like
var myVar;- AThe variable value(output) is set to undefined
- BThe variable value(output) is set to null
3What are some of the main differences between null and undefined?
- ANull is used to tell the program that a value is truly empty
- BUnlike undefined, null is a falsy value
- Ctypeof null will return "Object" and typeof undefined returns "undefined"
4=== operator is less strict in terms of identifying equality than ==
- ATrue
- BFalse
5Variables created inside of a function can only be used within the function
- ATrue
- BFalse
6Which var world is considered to have a global scope?
- Avar date;
function sayHello(){
} - Bfunction sayHello(){
var date;
}
- Avar date;
7What will console log out in the following code?
var part1 = "Team ";
function bam() {
var part2 = "Treehouse";
console.log(part2);
}
bam();- ATreehouse
- BUndefined
- CTeam
8Declaring a variable without a var keyword will evaluate the variable with global scope
- ATrue
- BFalse
Information
- Description
- Javascript Quiz on Javascript Variables, created by Rene Escobar on 17/12/2014.
- Author
- Rene Escobar
- Language
- English
- Views
- 970
- Tags
- Rating
- 3.0 out of 5 · 1 rating Rate this quiz