DEV Community 👩‍💻👨‍💻

Discussion on: My Solution to TOP Fundamentals Part 3 Problems

Collapse
frankwisniewski profile image
Frank Wisniewski

ES6 arrow functions give you an alternative way to write shorter syntax compared to function expression.

Because of this:

const capitalize = str => str[0].toLocaleUpperCase() + str.slice(1)
const lastLetter = str => str.slice(-1)
Enter fullscreen mode Exit fullscreen mode
Collapse
taepal467 profile image
Chantae P. Author

Agree. This is a good solution as well.