GithubHelp home page GithubHelp logo

js-writing-functions's Introduction

Writing Functions in JavaScript

Declaring Functions

  • By breaking down a large program into smaller, manageable functions, you can organize your code into meaningful units. Each function handles a specific task, making the code easier to understand and maintain.
  • Declaring functions creates the function and stores the name of the function and the code block in memory.
  • Once you have declared a function, you can execute the function throughout your program to run the same code and perform the same task.
  • Well-named functions with a clear purpose can make the code more readable. Instead of having a complex block of code at a single place, you have smaller functions with descriptive names that explain what they do.

Executing (or Calling) Functions

To "call" a function in JavaScript means to execute or invoke the function's code, allowing it to perform the tasks defined within its function body. When you call a function, you are telling the program to run the code that belongs to that particular function.

Prep

  1. Connect your js file to your HTML file
  2. Open your code in the browser and open your console

Instructions

In the js file, complete the list of exercises.

js-writing-functions's People

Contributors

abbreviatedman avatar anntech21 avatar lhack47 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.