SnipBits

how to replace an item of an array in Javascript ?

November 30, 2020Javascript 1 Min Read

In this Tutorial we will see how to replace an Element content in an array using a simple assigment . If you already know the index of the…

Optimize the Performance of React Apps - React Hooks

November 28, 2020React 2 Min Read

Hooks are a Feature that let us redefine the way that we write components in React. They let us use the Class based Component Features…

How to build a counter Application in Reactjs ?

November 22, 2020React 1 Min Read

In This Tutorial we will build a simple Counter application in Reactjs, applying many of the concepts and theory that we saw before. a demo…

check if all array elements are equal python

October 20, 2020Python 1 Min Read

In This Post we will see the Methods on how to check if all elements in a list are the same/equal. In a previous one we talked about the…

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 filter Lists in Python

October 04, 2020Python 2 Min Read

In this post, we will discuss three methods for list filtering in Python. Specifically, we will walk through how to use list comprehension…

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…

Check if all elements in a list are equal in Python.

September 10, 2020Python 1 Min Read

Check if all elements in a list are equal. Use and to compare all the values in the given list.

Check if all elements in a list are unique in Python.

September 10, 2020Python 1 Min Read

Returns if all the values in a list are unique, otherwise. Use on the given list to remove duplicates, use to compare its length with…

How to filter list in Python

September 08, 2020Python 1 Min Read

Filtering a lists means that you will keep in list the elements that satisfy a given Condition. For example , filtering to keep only the…

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…

React Interview Questions

June 27, 2020React 2 Min Read

what is React? Open frontend javascript Library, which is used for building user interfaces especially for SPA , It is used for handling…

optimize the Performance of React Apps

June 23, 2020React 3 Min Read

This article contains some tips to improve the Performance of your React App. memo and PureComponent Consider this small example here : Do…

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…

JSON methods

May 18, 2020Blog 1 Min Read

JSON (JavaScript Object Notation) is a data-interchange format. It is easy for humans to read and write. sometimes we want to convert it…

Detect the browser Window Size with Reactjs Hooks

May 16, 2020React 1 Min Read

This Hook is useful to get the current size of the browser window Use the to initialize the State variable to the first call of . The…

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…

monitoring State with useHoverEffect Reactjs

May 12, 2020React 1 Min Read

In this Snippet, we will be creating a useHoverEffect hook, that allows our components to know about the hover state of any element that we…

How to remove duplicates from a list in Python

May 06, 2020Python 1 Min Read

Filters out the unique values in a list. -Use a to get the count of each value in the list. -return a list containing only the unique…

Build a Reactjs Switch Toggle Component

May 05, 2020React 1 Min Read

Renders a toggle component. Use the to initialize the state variable to . Use an object, , to hold the styles for individual components…

fetch in a declarative manner in Reactjs with hooks

May 05, 2020React 1 Min Read

A hook that implements in a declarative manner. Create a custom hook that takes a and . Use the hook to initialize the and state…

4 SEO Tips

May 05, 2020Blog 2 Min Read

SEO is becoming increasingly relevant as the internet keeps growing. While most web developers usually have little experience with SEO, it…