filmov
tv
Basic JavaScript (47/111) | Write Reusable JavaScript with Functions | freeCodeCamp
![preview_player](https://i.ytimg.com/vi/kxsKZuMUzSo/sddefault.jpg)
Показать описание
Basic JavaScript (47/111) | Write Reusable JavaScript with Functions | freeCodeCamp
In JavaScript, we can divide up our code into reusable parts called functions.
Here's an example of a function:
function functionName() {
}
You can call or invoke this function by using its name followed by parentheses, like this: functionName(); Each time the function is called it will print out the message "Hello World" on the dev console. All of the code between the curly braces will be executed every time the function is called.
In JavaScript, we can divide up our code into reusable parts called functions.
Here's an example of a function:
function functionName() {
}
You can call or invoke this function by using its name followed by parentheses, like this: functionName(); Each time the function is called it will print out the message "Hello World" on the dev console. All of the code between the curly braces will be executed every time the function is called.