Task: Defining a Compound Function
Task
Swipe to start coding
- Define a new function called
showStudentData
having parameters:name
,age
andscore
. - Inside the
showStudentData
function:-
Use two
console.log
lines to output thename
andage
of the student in the following format:js -
Call the
getGrade
function usingscore
as an argument.
-
- Finally, call the
showStudentData
function with the following arguments:"Alice"
,22
,97
.
Solution
Everything was clear?
Thanks for your feedback!
SectionΒ 4. ChapterΒ 8