Challenge: Defining a Compound Function
Uppgift
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.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 52
single
Fråga AI
Fråga AI
Fråga vad du vill eller prova någon av de föreslagna frågorna för att starta vårt samtal
Fantastiskt!
Completion betyg förbättrat till 1.33
Challenge: Defining a Compound Function
Svep för att visa menyn
Uppgift
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.
Lösning
Var allt tydligt?
Tack för dina kommentarer!
Avsnitt 1. Kapitel 52
single