es6

04. Arrow Function πŸ‘©β€πŸŽ“πŸ‘¨β€πŸŽ“

πŸ› Fix Implementation of Arrow Functions

Work with a partner to resolve the following issue(s):

  • As a user, I want to run a script that will update a movie queue.

Expected Behavior

When a user runs the script, it will add and remove movies from the queue and display the movies currently in the queue.

Actual Behavior

The script exits out with an error message.

Steps to Reproduce the Problem

  1. Navigate to the starter folder from the command line.

  2. Run node index.js.

  3. Note the error that is printed.

Requirements

  • Update the code so that the program operates as expected.

πŸ’‘ Hint

What is an example of when we shouldn’t use arrow functions?

πŸ† BONUS

If you have completed this activity, work through the following challenge with your partner to further your knowledge:

  • How can you shorten the arrow function syntax even further with implicit return statements?

Use Google or another search engine to research this.


βœ… Solutions

Solutions Click Here