We're sorry but this app doesn't work properly without JavaScript enabled. Please enable it to continue.

This lesson's interactive features are locked, please to keep using them

Increment and Decrement

You can use += to increment a number by any amount, or the ++ operator to increment by just 1.

let bootdevCourseRating = 4;
bootdevCourseRating++;
console.log(bootdevCourseRating); // 5
bootdevCourseRating += 5;
console.log(bootdevCourseRating); // 10

And of course, there is a -- operator for decrementing by 1.

let bootdevCourseRating = 11;
bootdevCourseRating--;
console.log(bootdevCourseRating); // 10
bootdevCourseRating -= 5;
console.log(bootdevCourseRating); // 5

Assignment

Textio tracks how many messages have failed to send on a given day. Use the ++ operator in between the comments to increment the numFailedMessages.