- Welcome to Getting Started With ES2015 1:01
- Declaring Variables in JavaScript 1:20
- Creating Unchanging Variables With const 4:10
- Using Constants with Arrays and Objects 2:44
- Review creating variables with const 5 questions
- Defining a Variable with let 2:48
- Using let with for Loops 2:25
- Reviewing let and const 1:00
- Review let and const 5 questions
Well done!
You have completed Review creating variables with const!
Quiz Question 1 of 5
Which of the following produces a syntax error?
Choose the correct answer below:
-
A
const days = ['Monday', 'Tuesday', 'Wednesday', 'Thursday', 'Friday']; days.push('Saturday', 'Sunday');
-
B
const names = []; names[0] = 'Sarah'; names[1] = 'Ryad'; names[2] = 'Nic';
-
C
const items = ['eggs', 'milk', 'coffee']; items.pop( ); items.pop( ); items.pop( );
-
D
None of these produces an error.