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 trialFRANKIE Ochoa
2,759 PointsI'm still stuck on this could someone please help
greet('cool coders');
function greet(val) {
return `Hi, ${val}!`;
}
const greet = (val) => {
return `Hi, ${val}!`;
}
greet('cool coders');
2 Answers
Cameron Childres
11,820 PointsHi FRANKIE,
The code that you've added works perfectly, you just need to remove the code that was already supplied:
const greet = (val) => {
return `Hi, ${val}!`;
}
greet('cool coders');
wc93
25,725 PointsNot sure what you are trying to do. looks like you are calling the function twice in addition to defining the function after it has already been declared
FRANKIE Ochoa
2,759 PointsFRANKIE Ochoa
2,759 Pointsi got it thanks for the help