๐—•๐—ฎ๐˜€๐—ถ๐—ฐ ๐—™๐˜‚๐—ป๐—ฐ๐—๐—ถ๐—ผ๐—ป๐˜€ ๐—ถ๐—ป ๐—๐—ฎ v๐—ฎ๐—ฆ๐—ฐ๐—ฟ๐—ถ๐—ฝ๐˜ Functions in JavaScript help you organize code. They perform specific tasks. You can reuse them.

You can pass inputs to functions. They can perform actions and return outputs.

Here's how functions work:

You can set default parameters. For example: function greet(name = "Guest").

Functions can return values. For example: function add(a, b) { return a + b; }.

You can pass values to functions using parameters. Parameters are listed inside the parentheses.

The return statement sends a value out of a function.

Source: https://www.w3schools.com/js/js_function_arguments.asp Optional learning community: https://dev.to/madhanraj/basic-functions-in-javascript-ejm