DEV Community

Lincoln W Daniel
Lincoln W Daniel

Posted on

2

How to Use JavaScript Functions - Crash Course [Video]

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

Image of Datadog

Create and maintain end-to-end frontend tests

Learn best practices on creating frontend tests, testing on-premise apps, integrating tests into your CI/CD pipeline, and using Datadog’s testing tunnel.

Download The Guide

Top comments (0)

SurveyJS custom survey software

JavaScript Form Builder UI Component

Generate dynamic JSON-driven forms directly in your JavaScript app (Angular, React, Vue.js, jQuery) with a fully customizable drag-and-drop form builder. Easily integrate with any backend system and retain full ownership over your data, with no user or form submission limits.

Learn more

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay