Challenge: Defining a Compound Function
Task
Swipe to start coding
- Define a new function called
showStudentDatahaving parameters:name,ageandscore. - Inside the
showStudentDatafunction:-
Use two
console.loglines to output thenameandageof the student in the following format:Name: John Smith Age: 24 -
Call the
getGradefunction usingscoreas an argument.
-
- Finally, call the
showStudentDatafunction with the following arguments:"Alice",22,97.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 52
single
Ask AI
Ask AI
Ask anything or try one of the suggested questions to begin our chat
Awesome!
Completion rate improved to 1.33
Challenge: Defining a Compound Function
Swipe to show menu
Task
Swipe to start coding
- Define a new function called
showStudentDatahaving parameters:name,ageandscore. - Inside the
showStudentDatafunction:-
Use two
console.loglines to output thenameandageof the student in the following format:Name: John Smith Age: 24 -
Call the
getGradefunction usingscoreas an argument.
-
- Finally, call the
showStudentDatafunction with the following arguments:"Alice",22,97.
Solution
Everything was clear?
Thanks for your feedback!
Section 1. Chapter 52
single