- I am new to js.
- I am trying to write a code which reverses null terminated string.
- I tried writing using push and pop.
- but i am not getting output, can you tell me what is the problem.
- providing code below
var word = "Cell0";
//var char = word.stringCharAT();
for (i=0; i< word.length; i++) {
var pushWord = [];
pushWord.push(word[i]);
for (j=0; j< pushWord.length; j++) {
var reverseWord= [];
reverseWord = pushWord[j].pop;
console.log("reverseWord" + reverseWord);
}
}