---
title: "Discussion on \"Converting a String into array in JavaScript\" | Hashnode"
description: "Discussion on \"Converting a String into array in JavaScript\". There are three ways to convert a string into an array of character.\n\nUsing the Spread Operator (Keep in mind that the spread operator will convert the string into character array)\n\nconst string = \"This is a string\"\nconsole.log([...string])\n\nUsing th..."
url: "https://hashnode.com/posts/converting-a-string-into-array-in-javascript/62a01ee535465b6263093c47"
---

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

Discussion

# [Converting a String into array in JavaScript](https://vars.hashnode.dev/converting-a-string-into-array-in-javascript?utm_source=hashnode&utm_medium=feed)

There are three ways to convert a string into an array of character. Using the Spread Operator (Keep in mind that the spread operator will convert the string into character array) const string = "This is a string" console.log(\[...string\]) Using th...

Jun 8, 2022 · 1 min read · vars.hashnode.dev  
Read the article

-   [#javascript](https://hashnode.com/tag/javascript)
-   [#string](https://hashnode.com/tag/string)
-   [#spread-operator](https://hashnode.com/tag/spread-operator)
-   [#array](https://hashnode.com/tag/array)
-   [#split](https://hashnode.com/tag/split)

## Written by

[Vaibhav Dhiman](https://hashnode.com/@vars7899)

@vars7899

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

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
