No student devices needed. Know more
12 questions
What other languages are typically used with JavaScript?
Python
Ruby
HTML & CSS
SQL
What are the different ways to include JavaScript in your application? Choose all that apply.
<script> alert('Hello'); </script>
<link src='myjavascript.js'></link>
<link href="myjavascript.js></link>
<script src="myjavascript.js"></script>
How would you declare a variable in JavaScript?
var myName = "Sally"
myName = "Sally"
myName var = "Sally"
var myName = Sally
What is the difference between var and let in JavaScript?
There are no differences, they are both the same.
let is visible through blocks and accessed globally, var isn't.
var is visible through blocks and accessed globally, let isn't.
let is used more frequently, var isn't.
When would you use the const declaration in JavaScript? Choose all that apply.
When you're creating a variable.
When a variable has a constant value that won't change.
When creating a temporary variable.
What would alert(6 + '2') show?
8
62
6+'2'
6'2'
What would alert('6'-2) show:
An error Message
62
'6'-2
4
Look at the following code:
let attendees = 568;
attendees++
document.write(attendees)
What will print to the browser?
568
570
569
An error message
Look at the following code:
let total_price = 40;
total_price--
--total_price
document.write(total_price)
What will print to the browser?
39
40
38
42
Read the code below:
alert(true || false);
What would the output be?
True
False
Read the code below:
alert(false && true);
What would the output be?
True
False
Read the code below:
alert(!false);
What would the output be?
True
False
Explore all questions with a free account