๐—๐—ฎ๐˜ƒ๐—ฎ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ ๐—™๐˜‚๐—ป๐—ฐ๐˜๐—ถ๐—ผ๐—ป๐˜€ ๐—š๐˜‚๐—ถ๐—ฑ๐—ฒ

Functions are blocks of reusable code. They do one task. Think of them as small programs.

Use functions for common actions:

A function declaration has four parts:

You must call a function to run it. Use the name and parentheses.

Parameters and arguments are different.

The arguments object is a built-in tool. It lists all values you pass to the function.

The return keyword sends a value back. It stops the function. Always place it at the end.

Source: https://dev.to/kamalesh_ar_6252544786997/functions-in-javascript-with-keywords-lk6