I have an array exercise that have to use array to use, that is simply to put a sentence into characters, and store them in an array. Below is my program:
However, a message
Uncaught TypeError: abc.CharAt is not a function
appears in the console. Could you tell me which part I had done wrong and how to correct it? The prerequisite criteria is to solve this question using array.
strarray = []
abc = "hello"
for (i = 0; i < abc.length; i++) {
strarray.push(abc.CharAt(i))
}
console.log(strarray)