I am having a string - Item 1 , need to convert it into an array
I have tried the following -
var demo = "Item 1"
let array = [demo]
console.log(array);
this gives me the following result on console -
0: "1"
1: "Item"
2: "Item 1"
length: 3
[[Prototype]]: Array(0)
expected result:
0: "Item 1"
length: 1
[[Prototype]]: Array(0)