Foundations

Arrow Functions

Arrow Functions

Arrow functions are function expressions with a shorter syntax. They are still values, so you usually store them in a variable.

Your task: Create formatItem as an arrow function. It should take a name and count, then return a label containing both values. Store and log the label for the provided data.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Arrow Functions

Arrow functions are function expressions with a shorter syntax. They are still values, so you usually store them in a variable.

Your task: Create formatItem as an arrow function. It should take a name and count, then return a label containing both values. Store and log the label for the provided data.

Free with a JS Exercises account

Sign in to start coding, run your solution, and keep your progress saved for later. No payment needed.

By continuing, you agree to our Terms and Privacy Policy. We'll send occasional product updates and news. You can unsubscribe anytime.

Console

Run code to see output.