Signup/Sign In
Ask Question
Not satisfied by the Answer? Still looking for a better solution?

LEVEL 5 > LESSON 3

let i = 0;
const str = "studytonight";
// write your code here
while(i < str.length)
{
console.log(str[i] + " " +i);
i++;
}
not correct
by

1 Answer

kshitijrana14
Try this one:

let i = 0;
const str = "studytonight";

while(i<str.length)
{
console.log(str[i] + "");
i++;

}

Login / Signup to Answer the Question.