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 trialkyle long
Front End Web Development Techdegree Student 2,678 Pointsi think i need to review this lesson, forgot what to do .
In the function below, set the default value of the partOfDay parameter to 'morning'.
function greet( name, partOfDay
1 Answer
Peter Danville, Jr
3,198 PointsIt should be written as such:
function greet( name, partOfDay = 'morning')
Jan Su
3,943 PointsJan Su
3,943 Pointsfunction greet( name, partOfDay = 'morning' ) { return
Good ${partOfDay}, ${name}!
; }