GoConqr hat ein neues Design! Sag uns, wie es dir gefällt.

Modul 2 von 16 · Medien

Functions Syntax

Kostas Diakogiannis

Functions Syntax

Functions' syntax 

We can define a function by using the function keyword followed by the unique name of the function and parentheses (we will talk later about them). Then as usual follows the body of the function. 

There inside the body we can define variables and do JS things as like we were in the global execution context. Once the function declaration finishes, we can call and execute whatever lies inside the function's body by calling the function by it's name as shown above followed by parentheses. 

The function summary anytime it is called, creates two variables named a and b with corresponding values 10 and 20 and prints the sum of them to console. 

 

Anleitung

Um im Kurs weiterzukommen, sende einen Versuch dieses Quiz ab. Du kannst ihn nach der letzten Frage absenden.

Zum gewählten Modul

Feedback

Worum geht es?

Wie gefällt dir das neue Design?

Dein Eindruck