Convert a Text list into a Javascript Array

Convert a list of values into JavaScript array.
Copy in the text and click Get Results button. Array code can be copied out from the bottom textarea.


Text Inputs


MyArray

array item 1
array item 2
array item 3

Javascript Array Code Output



var MyArray = ['array item 1','array item 2','array item 3'];


JavaScript Array Name




Your text list to copy in here

Use Notepad or a text editor to open your text list file and copy the contents into the top text area box. You can also type in your list manually.
Shortcuts include: Ctrl A for select all, Ctrl C for copy and Ctrl V for paste.

     Press Get Result button after completing copying in list in to text area above.


JavaScript Array Results Here



Copy the lower Javascript results into a Javascript code editor.