Are you ready?
11 questions to solve
Instructions
- This quiz goes to full-screen once you press the Start button.
- At the end of the quiz, you are able to review all the questions that you answered wrong and see their explanations.
JavaScript can go inside an HTML tag and a seperate file.
True or false?
True or false?
JavaScript can go inside the
<script>
tag and an external .js
file. Hence the question is True.<script>
tags can be nested inside head
and body
True or false?
Please refer to where to write JavaScript for more details.
1str
is a valid JavaScript variable name.True or false?
Clearly false. Variable names can't begin with numbers.
How do variables and constants differ in JavaScript?
Both variables and constants are identifiers in JavaScript; the way they differ is in whether they could be changed. In particular, a variable can be changed during a script's execution whereas a constants can NOT. This goes with choice (A). Talking about choice (B), it's clearly wrong — both variables and constants can be used in expressions. Hence, the correct choice is (A).
What is variable hoisting?
Hoisting is to bring up a variable declaration in its scope. For more info please visit JavaScript Variables.
A tertiary operator takes three operands.
True or false?
True or false?
A unary operator takes one operand, a binary takes two and a tertiary takes three. More on JavaScript Operators.
Of the following which one shows an example of a string primitive?
Please refer to JavaScript Datatypes for more details.
JavaScript variable names are case-sensitive.
True or false?
True or false?
Please refer to JavaScript Variables for more details.
A unary operator takes how many operands?
Unary, binary and tertiary operators take 1, 2 and 3 operands respectively. For more info refer to JavaScript Operations.