#14 JavaScript Tutorial | Functions




Functions are one of the fundamental building blocks in JavaScript.
A function is a JavaScript procedure—a set of statements that performs a task or calculates a value.
A JavaScript function is a block of code designed to perform a particular task.
A JavaScript function is executed when “something” invokes it (calls it).
Why Functions?
You can reuse code: Define the code once, and use it many times.
You can use the same code many times with different arguments, to produce different results.
For Program code, info & more resources checkout this article – https://simplesnippets.tech/functions-in-javascript/
Video by – Tanmay Sakpal
Simple Snippets Channel link – https://www.youtube.com/simplesnippets

Original source


21 responses to “#14 JavaScript Tutorial | Functions”

  1. function FilterUtils(){
    this.HSVtoRGB = function (h, s, v){
    return [r * 255, g * 255, b * 255];
    };
    this.RGBtoHSV = function (r, g, b){
    r = r/255; g = g/255; b = b/255;

    return false;
    };
    }

    can anybody tell what type of syntax is this? plz

Leave a Reply