scrimba
JS Deep Dive
Variables & Strings
Challenge: const & let
Go Pro!Bootcamp

Bootcamp

Study group

Collaborate with peers in your dedicated #study-group channel.

Code reviews

Submit projects for review using the /review command in your #code-reviews channel

Challenge: const & let
AboutCommentsNotes
Challenge: const & let
Expand for more info
index.js
run
preview
console
'use strict';

// Challenge 1: We want to log out the name "Reed", but it doesn't work. Can you fix it?
const name;
name = "Reed";
console.log(name);

// Challenge 2: We want 102 to be logged out. But we're getting an error instead. Try to fix it!
const count = 100;
count = 101;
count = 102;
console.log(count);

// Challenge 3: We want to log out the price (50), but it doesn't work. Can you fix it?
let price;
console.log(price);
price = 50;
Console
!
SyntaxError: Missing initializer in const declaration
,
/index.html
-2:20