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

Functions are code blocks. They do one task.

Why use functions?

How to build one:

Functions run when you call them. Use the same function many times.

Variables inside a function are local. Only the function sees them. You use the same variable name in different functions.

Store function results in variables.

How data moves:

Source: w3schools.com Optional learning community: https://dev.to/vidhya_murali_5aabe7784bd/functions-in-javascipt-19ei