scrimba
Frontend Career Path
Essential JavaScript concepts
JS Mini Projects
Inline Arrow Functions Challenge
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

Inline Arrow Functions Challenge
AboutCommentsNotes
Inline Arrow Functions Challenge
Expand for more info
index.js
run
preview
console
const distanceTraveledMiles = [267, 345, 234, 190, 299]

const distanceTraveledKm = distanceTraveledMiles.map(function(distance){
return Math.round(distance * 1.6)
})

console.log(distanceTraveledKm)

/*
Challenge
1. Refactor this .map method so the inline function is
an arrow function.
2. Write the least amount of code possible.
*/
Console
[
427
,
552
,
374
,
304
,
478
]
,
/index.html
-2:24