In JavaScript, Array is a single variable that is used to store different elements. Basically there are two ways to declare an array in JavaScript.

var cars = [];
var cars = new array();

In this article, I am going to mention mostly common array methods used in JavaScript.


This method is used to merge two or more arrays. This doesn’t modify the existing array, but returns a new array.

const arr1 = ['Lamborghini', 'Audi', 'Mercedes-Benz'];
const arr2 = ['Ford', 'Toyota'];
const cars = arr1.concat(arr2);
//output: ['Lamborghini', 'Audi', 'Mercedes-Benz', 'Ford', 'Toyota']


This method creates a new array with all…

Each programming language has its own standardize way of writing code. And JavaScript follows both ES5 and ES6. Whether it is ECMAScript 5(ES5) or ECMAScript 6(ES6), it is a standard for scripting languages like JavaScript, JScript etc. When writing a JavaScript code using these standards, there are slight differences between ES5 and ES6.

In this article, I am going to explain these differences with the examples.


In ES5, there is a one way of defining variables using var keyword. But ES6 has introduced two more ways of defining variables using keywords let and const. However, let and const use block…

React Native has become the most popular cross-platform mobile application development framework which is developed and maintained by Facebook.

In this article, I am going to divide this topic to three main sections such as,

  1. Why React Native?
  2. Prerequisites and environment setup
  3. Initializing your first project

Let’s dig into the topic.

Why React Native?

React Native is a cross-platform mobile application development framework which can be used to develop mobile apps for Android as well as iOS, using React with native technologies.

Since it creates platform-specific versions of components, a single codebase which is written using JavaScript, can be shared across Android as…

Chenuka Sumanasekara

Open Source Enthusiast🖤 | JavaScript Developer👨🏻‍💻 | Undergraduate — Software Engineering🧑🏻‍💻 | SLIIT👨🏻‍🎓

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store