A function in javascript is a group of statements that execute a task or helps to calculate a value. Therefore functions are the solutions to help provide a variable. In javascript, calling a function is a method of running the code and testing whether the variables were used correctly in the statements being performed. Therefore typically people run their function at the end to check whether the code was formatted and used properly. When one passes a function arguments , that means that the function being executed and passed has been successfully entered in. This stores the data in the online platform data cloud. The purpose of the return keyword in functions is to end the function while also returning the controls to the original function being executed.
Reader Interactions
Comments
Leave a Reply
You must be logged in to post a comment.
Hi Cassidy! This is a great explanation of JavaScript functions. JavaScript functions are great for calculating values and performing a task. Knowing the steps that it takes to make this possible allows code to be more readable for me. You will know if there is an issue in your code if your function does not run properly. When practicing coding through our homework assignments I mistyped one thing and had to look line by line to see what was wrong. From experience, it is important to make sure you pay attention and practice coding so that your functions are executed!