Home » Javascript

Javascript basic algorithms

js algorithms

If you are working javascript then you need to understand these basic algorithm because these algorithm are very useful in your daily programming life. Get uniq from array // get uniq from array const nums = [1, 2,…

Read More »

JSON, n JSON method


The JSON (JavaScript Object Notation) is a general format to represent values and objects. JSON is the string form of object. Syntax: JSON.stringify(value[, replacer[, space]]) Parameters: Value The value to convert to a JSON string. Replacer Optional The…

Read More »

ES6 arrow functions

es6 arrow function

Arrow function taken from CoffeeScript (a transcompiled language). Arrow function, also called “fat arrow” functions. This is represented by => (Flat Arrow). It is anonymous and can change the way this bind into function. When we are using…

Read More »

Javascript function arguments handling


In javascript we don’t have any method to check our parameters and arguments. Earlier tutorial, We have learned that functions can have parameters; like – functionName(parameter1, parameter2, parameter3) { code to be executed } but suppose that we…

Read More »

Javascript function


A function is a block of statements, which is used to perform a specific task.In javascript functions are defined with the function keyword. There are 3 ways to create a function. 1. by declaration. 2. by function expression. 3. by constructor. (good for…

Read More »

Javascript loops


Loops are main component in every programming language. Iteration or loop is a structure, series, or process, the end of which is connected to the beginning. But in programming it allow to repeat block code, until the given…

Read More »

Javascript type casting


In javascript we can convert one type to another type (typecasting). As we know true and false are related to boolean data type. Zero, empty string, undefined, null, NaN are falsy values. All non-empty things and true are Truthy…

Read More »

Javascript conditional operator


If, else and switch are conditional statement or operators in javascript. Conditional statement changes the flow of the program according to test cases. So if the block contains test expression inside the parenthesis. if the test expression is…

Read More »

Type detection


Type detection It is a way by which we can identify the type of data. We know that data type can be three type. So if we are working on data sometime we need to identify datatype of…

Read More »

Javascript Operators


Operators An Operator is a symbol used for a specific task. That task may be related to math or logical operation. Operators work on operands. var sum = 2 + 3; Here 2, 3 are operands and +…

Read More »