Welcome to the Treehouse Community
Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.
Looking to learn something new?
Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.
Start your free trialAbdulloh Ismatullaev
1,765 PointsHow to make arrow function
tried many ways to make it arrow function but did not work correctly. By the way I am using => t make it arrow function
function greet(val) => {
return `Hi, ${val}!`;
}
const greet('cool coders');
2 Answers
Shaun Kelly
35,560 Pointsconst greet = (val) => {
return `Hi, ${val}!`;
}
greet('cool coders');
Abdulloh Ismatullaev
1,765 PointsThank you very much !
Abdulloh Ismatullaev
1,765 PointsAbdulloh Ismatullaev
1,765 PointsThank you very much !
Ahmad Hill
Full Stack JavaScript Techdegree Student 1,883 PointsAhmad Hill
Full Stack JavaScript Techdegree Student 1,883 PointsWhy did you have to make 'greet' a variable to make it an arrow function?