Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Leer Challenge: Improving the Grade Categorizer | Mastering Functions
Introduction to JavaScript

Veeg om het menu te tonen

book
Challenge: Improving the Grade Categorizer

Taak

Swipe to start coding

In one of the tasks in the previous section, you wrote a program which calculated the grades of the students based on their score.

Imagine we would like to calculate the grades of many different students. For that, it would be more convenient to convert this code into a function, therefore, in this task the goal is to convert the given code into a function.

  • Define a function called getGrade with a parameter called grade.
  • Put the given code inside the getGrade function.
  • Finally, call the function four times with the following values respectively: 30, 50, 70, 97.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 7
Onze excuses dat er iets mis is gegaan. Wat is er gebeurd?

Vraag AI

expand
ChatGPT

Vraag wat u wilt of probeer een van de voorgestelde vragen om onze chat te starten.

book
Challenge: Improving the Grade Categorizer

Taak

Swipe to start coding

In one of the tasks in the previous section, you wrote a program which calculated the grades of the students based on their score.

Imagine we would like to calculate the grades of many different students. For that, it would be more convenient to convert this code into a function, therefore, in this task the goal is to convert the given code into a function.

  • Define a function called getGrade with a parameter called grade.
  • Put the given code inside the getGrade function.
  • Finally, call the function four times with the following values respectively: 30, 50, 70, 97.

Oplossing

Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Was alles duidelijk?

Hoe kunnen we het verbeteren?

Bedankt voor je feedback!

Sectie 4. Hoofdstuk 7
Switch to desktopSchakel over naar desktop voor praktijkervaringGa verder vanaf waar je bent met een van de onderstaande opties
Onze excuses dat er iets mis is gegaan. Wat is er gebeurd?
some-alt