A function in Javascript is a block of code that performs a specific task (programiz.com) You can create a function to do tasks such as adding, subtracting, etc. or color a draw a shape. Creating functions make your program easy to understand. When creating a function, you must use a syntax to declare that function. The function is declared using the keyword [function]. And when creating a name for the function, it should be descriptive. A function is written using { }. To use a function, you have to call it. When using a function return, you can return the value to a function call. Returning statement indicates that the function has ended. There are benefits of using functions. When you create a function, you can reuse it as needed. Functions makes your programs easier due to each task being broken down, and easier to read (programiz.com).
JavaScript function and function expressions. Programiz. (n.d.). Retrieved March 2, 2023, from https://www.programiz.com/javascript/function#:~:text=A%20function%20is%20declared%20using,the%20function%20add%20or%20addNumbers%20.
Hi Brittany, I really thought you did a great job here in describing functions in JavaScript. I feel as if you broke it down in a way that even the most inexperienced programmer could understand and then use functions just moments after!
Hello Brittany, I wanted to take a moment to commend you on your exceptional job in explaining JavaScript functions. Your explanation was clear and concise, making it easy for even novice programmers to grasp the concept and start using functions right away. Your attention to detail and expertise in the subject matter were truly impressive. In fact, I would love to hear more from you on other JavaScript topics as I am certain that you possess a wealth of knowledge to share with others. Keep up the great work!