Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Learn Task: Defining a Compound Function | Mastering Functions
Introduction to JavaScript

Swipe to show menu

book
Task: Defining a Compound Function

Task

Swipe to start coding

  • Define a new function called showStudentData having parameters: name, age and score.
  • Inside the showStudentData function:
    1. Use two console.log lines to output the name and age of the student in the following format:

      js
    2. Call the getGrade function using score as an argument.

  • Finally, call the showStudentData function with the following arguments: "Alice", 22, 97.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 8

Ask AI

expand
ChatGPT

Ask anything or try one of the suggested questions to begin our chat

book
Task: Defining a Compound Function

Task

Swipe to start coding

  • Define a new function called showStudentData having parameters: name, age and score.
  • Inside the showStudentData function:
    1. Use two console.log lines to output the name and age of the student in the following format:

      js
    2. Call the getGrade function using score as an argument.

  • Finally, call the showStudentData function with the following arguments: "Alice", 22, 97.

Solution

Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
Everything was clear?

How can we improve it?

Thanks for your feedback!

SectionΒ 4. ChapterΒ 8
Switch to desktopSwitch to desktop for real-world practiceContinue from where you are using one of the options below
We're sorry to hear that something went wrong. What happened?
some-alt