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

Pyyhkäise näyttääksesi valikon

book
Task: Defining a Compound Function

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 4. Luku 8
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?

Kysy tekoälyä

expand
ChatGPT

Kysy mitä tahansa tai kokeile jotakin ehdotetuista kysymyksistä aloittaaksesi keskustelumme

book
Task: Defining a Compound Function

Tehtävä

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.

Ratkaisu

Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Oliko kaikki selvää?

Miten voimme parantaa sitä?

Kiitos palautteestasi!

Osio 4. Luku 8
Switch to desktopVaihda työpöytään todellista harjoitusta vartenJatka siitä, missä olet käyttämällä jotakin alla olevista vaihtoehdoista
Pahoittelemme, että jotain meni pieleen. Mitä tapahtui?
some-alt