Notice: This page requires JavaScript to function properly.
Please enable JavaScript in your browser settings or update your browser.
Aprenda Calling Functions | Understanding and Writing Functions
Functions in JavaScript

bookCalling Functions

When you call a function in JavaScript, you tell the program to execute the code inside that function. To call a function, you write its name followed by parentheses. If the function expects data, you provide it inside the parentheses. This process is called invoking the function. When a function is called, the JavaScript engine jumps to the function's code, runs it, and then returns to where the call was made. You can call a function as many times as you want, and each call can use different data.

1234567
function greet(name) { console.log("Hello, " + name + "!"); } greet("Alice"); greet("Bob"); greet("Charlie");
copy
question mark

Which of the following statements about calling functions in JavaScript are true?

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 4

Pergunte à IA

expand

Pergunte à IA

ChatGPT

Pergunte o que quiser ou experimente uma das perguntas sugeridas para iniciar nosso bate-papo

Awesome!

Completion rate improved to 7.69

bookCalling Functions

Deslize para mostrar o menu

When you call a function in JavaScript, you tell the program to execute the code inside that function. To call a function, you write its name followed by parentheses. If the function expects data, you provide it inside the parentheses. This process is called invoking the function. When a function is called, the JavaScript engine jumps to the function's code, runs it, and then returns to where the call was made. You can call a function as many times as you want, and each call can use different data.

1234567
function greet(name) { console.log("Hello, " + name + "!"); } greet("Alice"); greet("Bob"); greet("Charlie");
copy
question mark

Which of the following statements about calling functions in JavaScript are true?

Select the correct answer

Tudo estava claro?

Como podemos melhorá-lo?

Obrigado pelo seu feedback!

Seção 1. Capítulo 4
some-alt