Photo by Florian Olivo on Unsplash

An array in JavaScript is a data structure, which can hold one or more values at a time. Unlike most languages where array is a reference to the multiple variables, in JavaScript array is a single variable that stores multiple elements.

Array methods are nothing but JavaScript built-in functions which can be applied on the array. Array has many methods to perform different operations and to make things a lot more easier.

Array Methods

  1. array.pop()
  2. array.shift()
  3. array.unshift()
  4. array.map()
  5. array.filter()
  6. array.sort()
  7. array.concat()
  8. array.every()
  9. array.some()
  10. array.includes()
  11. array.join()
  12. array.find()
  13. array.findIndex()
  14. array.indexOf()
  15. array.reverse()

array.push()

The push()method adds one or more elements to the end of the…


Strings — Any character written inside quotes is considered as a string in JavaScript. If there is nothing inside the quotes then also it is considered as a string. We Can use single or double quotes. We can also use quotes inside a string but they should not match the quotes which are surrounding the string.

String methods

  1. charAt()
  2. indexOf()
  3. lastIndexOf()
  4. toUperCase()
  5. toLowercase()
  6. concat()
  7. trim()
  8. slice()
  9. replace()
  10. split()
  11. substring()

1. The length() Method

The length()method returns the length of the string.

const string = "This is a string.";const strLength = string.length;console.log(`The length of the string is ${strLength}.`);

output : -

The length of…


Preview of our To-Do app

The best way to learn something is by doing. In this tutorial, we will be building a To-Do List app using pure JavaScript. If you are a beginner and tired of studying from boring theoretical tutorials then you are in a right place because here we will practically build this To-Do app from scratch. Don’t worry I have explained each and every step to develop our To-do app.

In this app, we will be able to add new tasks to be done, delete tasks, mark tasks after completion, we will have a drop-down menu to filter our tasks on basis…

Surya Shakti

Computer Science Student, Front-end developer, love photography and paintings, now a blogger too i guess.

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