SnipBits

How to Remove Elements From End or Beginning of Javascript Array

October 07, 2020Javascript 1 Min Read

Arrays in Javascript allow us to group values and iterate over them, we can add and remove array elements in different ways. Instead of a…

Javascript Ternary Operator

October 05, 2020Javascript 1 Min Read

The Ternary Operator is an Operator in Javascript that works with 3 operands. It's a short way to express conditionals. It looks like this…

How to check if an object is empty in JavaScript

September 27, 2020Javascript 1 Min Read

The javascript Objects are compared by reference, that's why we cannot do a comparaison like this The Solution is to pass the built-in…

How to Sort an array in Javascript

September 13, 2020Javascript 1 Min Read

One of the Classic Tasks in a Life of a Developer is to sort something . Lets begin with the first Example , if you want to sort an array…

How to check if an array contains a value in JavaScript

August 30, 2020Javascript 1 Min Read

It’s really nice to know whether or not an item is contained within your array. There is too many ways to detect if an Array in javascript…

How to test if a string includes a substring in Javascript

August 18, 2020Javascript 1 Min Read

There is too many ways to check if a Javascript string contains a substring. Its nowadays one of the most common tasks in any Programming…

How to swap two elements in an array in Javascript

August 17, 2020Javascript 1 Min Read

How can we swap two elements in an array, in javascript ? Suppose that we have an array which contains 5 Numbers . For example we want to…

How to test if a value is a number in JavaScript

July 22, 2020Javascript 1 Min Read

There is many ways to check if a value is a number. The first is . The function determines whether a value is or not. If returns false…

How to Copy Text to Clipboard

July 20, 2020Javascript 1 Min Read

we use The copy to clipboard functionality many times daily. A very common need when building websites is the ability to copy text to…

How to detect Network Status in Javascript

July 13, 2020Javascript 1 Min Read

returns the online status of the browser. The Property returns a Boolean Value, mean that you are online and mean that you are offline…

How to Remove Duplicates from array in Javascript

June 10, 2020Javascript 1 Min Read

There is many ways to remove duplicates from an array in Javascript. I think that the simplest approach is to use Object, which lets you…

API Development with Node.js and Express

June 03, 2020Javascript 3 Min Read

This Tutorial is about how to handle API Routes inside of a Node.js and Express Project. Definition of Routing Routing or router in web…

JavaScript map() Method

June 01, 2020Javascript 1 Min Read

there is more than one technique to iterate through datasets in Javascript. One of the popular methods is the method. the method creates…

cache API in Javascript

May 26, 2020Javascript 3 Min Read

This is a small Tutorial about using the Cache API in Javascript The Cache API have a big role in the Offline Modus of many web Apps. It…

Async Await Functions Javascript

May 22, 2020Javascript 2 Min Read

Async/await Functions , an addition to the ES2017 , help us to write a synchronous-looking code while performing asynchronous Tasks behind…

How to Check if an array contains a value matching some criterias in Javascript

May 14, 2020Javascript 1 Min Read

The method tests if at least one element passes the test implemented by the provided function. It returns a Boolean value.

How to Check if all array elements are equal to a given value in Javascript

May 14, 2020Javascript 1 Min Read

The method tests whether all elements in the array by the provided function. It returns a Boolean value. when you want for example to Check…

How to clone an array in Javascript

May 14, 2020Javascript 1 Min Read

There is too many ways to clone an Array in Javascript you can use the method where it returns a copy of a portion of an array into a new…