Tag Javascript

5 posts found

Defining functions in JavaScript

SEPTEMBER 03, 2019  ·  1013 WORDS

Generally, a function is a sequence of instructions or a 'subprogram' that can be invoked by the code that is external (or internal) to that function. In essence, functions 'encapsulate' a particular task. Functions are one of the fundamental building blocks in JavaScript and really understanding functions can help tackle [...]


Parameters & arguments in JavaScript

AUGUST 23, 2017  ·  552 WORDS

Javascript is a functional language meaning that functions are the primary modular units of execution. Functions are obviously very important in Javascript. When talking about functions, the terms parameters and arguments are often interchangeably used as if it were one and the same thing but there is a very subtle difference. Parameters a [...]


Generators in JavaScript

AUGUST 16, 2017  ·  828 WORDS

Generators are a cutting edge addition to ES6 JavaScript. Async code is harder to manage with JavaScript’s single threaded execution model and Generators and Promises are welcome inclusions in the JS arsenal. Let’s explore Generators in detail in this article. Generators Generators are special types of functions in the sense that unlike [...]


Declaring variables in ES6 JavaScript

AUGUST 06, 2017  ·  532 WORDS

Before ES6, was the only keyword used to declare variables in JavaScript. Unlike other languages like C, variables do not need to use different keywords based on their type. For example in C, integers undergo a different treatment as compared to strings but in JS we don’t need to specify the type [...]


Hoisting in JavaScript

AUGUST 01, 2017  ·  850 WORDS

The term Hoisting is used in a lot of JavaScript blogs to explain identifier resolution. Using the literal meaning of the word as a metaphor, hoisting is employed to explain how Variables and Function declarations are ‘lifted’ to the top of a function or a global scope. While this does provide a basic [...]