1.7 Short Look Into What Functions Are
📎

1.7 Short Look Into What Functions Are

1.7 Short Look Into What Functions Are

Usually functions would appear much later when you have a much better understanding of JS. However, functions will likely be used way before its actual lesson. So, here’s a quick rundown of how a function is called.

// some function I have made already (function is named cool_function)
// calling the function I have made
cool_function(x, y)

In the code above, I was able to call my function with the name cool_function. I also have x and y inside parentheses. Think of these as inputs. We are giving data to the function for the function to process.

Previous Section

1.6 Variables

⚖️

Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.