Course: JavaScript

Progress (0%)

JavaScript Foundation Quiz

Quiz 3 11 questions

Prerequisites for the quiz

  1. All of JavaScript Foundation Unit

Are you ready?

11 questions to solve

  1. This quiz goes to full-screen once you press the Start button.
  2. 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?
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.
What is var str usually called?
Please refer to JavaScript variables for more details.
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?
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.
In JavaScript we can give comments using
Please refer to JavaScript Comments for more details.
JavaScript variable names are case-sensitive.
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.

"I created Codeguage to save you from falling into the same learning conundrums that I fell into."

— Bilal Adnan, Founder of Codeguage