---
title: "Discussion on \"3 Ways to Create Arrays in JavaScript and Array fill() method\" | Hashnode"
description: "Discussion on \"3 Ways to Create Arrays in JavaScript and Array fill() method\". The array is a linear data structure and used to store multiple values in a single variable at a time. Today, we will look at three ways to create an array in JavaScript and the array fill() method. \nSo, let's get started.  \nThe basic way\nThe simples..."
url: "https://hashnode.com/posts/3-ways-to-create-arrays-in-javascript-and-array-fill-method/60d9c8b568364a2e7b2ce774"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [3 Ways to Create Arrays in JavaScript and Array fill() method](https://junaidshaikh.hashnode.dev/3-ways-to-create-arrays-in-javascript-and-array-fill-method?utm_source=hashnode&utm_medium=feed)

The array is a linear data structure and used to store multiple values in a single variable at a time. Today, we will look at three ways to create an array in JavaScript and the array fill() method. So, let's get started. The basic way The simples...

Jun 28, 2021 · 3 min read · junaidshaikh.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#web-development](https://hashnode.com/tag/web-development)
-   [#frontend-development](https://hashnode.com/tag/frontend-development)
-   [#array-methods](https://hashnode.com/tag/array-methods)

## Written by

[Junaid Shaikh](https://hashnode.com/@junaidshaikh)

@junaidshaikh · Maharashtra, India

  
[View profile](https://hashnode.com/@junaidshaikh)

Frontend Developer

## Responses 2

Markdown supported · ⌘↵ to post

[Amro abd elhafeez](https://hashnode.com/@amrocrm)

[Jun 29, 2021](https://hashnode.com/posts/3-ways-to-create-arrays-in-javascript-and-array-fill-method/60d9c8b568364a2e7b2ce774/comment/60dadca168364a2e7b2cffd6)

is string array are mutable

[Junaid Shaikh](https://hashnode.com/@junaidshaikh)

[Jun 30, 2021](https://hashnode.com/posts/3-ways-to-create-arrays-in-javascript-and-array-fill-method/60d9c8b568364a2e7b2ce774/comment/60dadca168364a2e7b2cffd6#reply-60dbe1777c7df7644acde338)

Hi Amro, Did you mean array made from string characters?

Like this?

const name = 'junaid'

const nameLetters = Array.from(name)

console.log(nameLetters) // \[ 'j', 'u', 'n', 'a', 'i', 'd' \]

[Mohit Rakhade](https://hashnode.com/@devmohit)

[Jun 28, 2021](https://hashnode.com/posts/3-ways-to-create-arrays-in-javascript-and-array-fill-method/60d9c8b568364a2e7b2ce774/comment/60d9cc0e703d372ea06c81fb)

Nicely explained ✨
