-
-
Notifications
You must be signed in to change notification settings - Fork 197
ZA-CapeTown | TP-May-2025 | Dawud Vermeulen | Module-Structuring and Testing Data Sprint-2 #673
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
ZA-CapeTown | TP-May-2025 | Dawud Vermeulen | Module-Structuring and Testing Data Sprint-2 #673
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Good work - there's just one missing bit you forgot in the first file.
function capitalise(str) { | ||
let str = `${str[0].toUpperCase()}${str.slice(1)}`; | ||
return str; | ||
} | ||
|
||
// =============> write your explanation here | ||
// the function takes string arg it gets the first character of the string and capitalises it. the .slice method gets the rest of the string and concats it the capitalized first char. all this is assinged to var called str and returns the str. | ||
// the error says the var str has already been used in the function, this is because the var str is declared in the function and then again in the return statement. | ||
// =============> write your new code here |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You've identified the problem - can you write some fixed code?
Great work - you can close this sprint now |
Learners, PR Template
Self checklist
Changelist
Questions
Please will you review my PR and let me know if any updates are needed. I would appreciate clear instruction. Thank you 🙏🏽