loading...

How to Use JavaScript Functions - Crash Course [Video]

lincolnwdaniel profile image Lincoln W Daniel ・1 min read

Functions are another necessary part of programming in JavaScript. When building programs in JavaScript, you should use functions to organize your program into smaller, executable pieces of code that are responsible for specific actions. With your functions defined, you can call them from anywhere in your program with arguments that can influence the result.

In this video, we learn how to declare JavaScript functions with a name and arguments, call a function with parameters, and return a result. We also learn how to define functions on objects as methods and access the properties of the object within the function.

Along the way, we explore the DRY and Single Responsibility (SRP) principles for keeping our code clean and easy to reason about. By the end of this tutorial, you should have a strong understanding of how to use functions in JavaScript to build better programs.

My LinkedIn profile: https://www.LinkedIn.com/in/LincolnWDaniel
My website: http://www.LincolnWDaniel.com
1Liner Blog: https://www.1Liner.dev

Posted on by:

lincolnwdaniel profile

Lincoln W Daniel

@lincolnwdaniel

Creating more winners in writing. Author @JavaForHumans. Former: Founder & Editor in Chief @MarkGrowth, Software Engineer @Medium

Discussion

pic
Editor guide