Task: Defining a Compound Function
Taak
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
.
Oplossing
Was alles duidelijk?
Bedankt voor je feedback!
Sectie 4. Hoofdstuk 8