Skip to content
Foxipa
Code Completion 5 Challenges

Complete the variable bindings

Complete each JavaScript snippet by supplying the missing declaration, assignment, or template substitution. Check every challenge as you go.

Beginner ~5 min read

Challenge 1

Choose the declaration keyword for a counter that will be reassigned.

javascript Your answer
 count = 1;
count += 1;

Press Ctrl⌘Enter to check your answer

Challenge 2

Choose the declaration keyword for a binding that will not be reassigned.

javascript Your answer
 siteName = "Foxipa";

Press Ctrl⌘Enter to check your answer

Challenge 3

Complete the assignment that changes the current score to 20.

javascript Your answer
let score = 10;

console.log(score);

Press Ctrl⌘Enter to check your answer

Challenge 4

Insert the expression that places the learner name into the template literal.

javascript Your answer
const learnerName = "Maya";
console.log(`Hello, !`);

Press Ctrl⌘Enter to check your answer

Challenge 5

Complete the update that adds 1 to the current lesson count.

javascript Your answer
let completedLessons = 3;

console.log(completedLessons);

Press Ctrl⌘Enter to check your answer