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:

      Name: John Smith  
      Age: 24
      
    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
single

single

Ask AI

expand

Ask AI

ChatGPT

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

close

Awesome!

Completion rate improved to 1.33

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:

      Name: John Smith  
      Age: 24
      
    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!

close

Awesome!

Completion rate improved to 1.33

Swipe to show menu

some-alt