While loop


#1

var name =function(x)
{
while(x.length>5)
{
console.log(x);
}
};
name(“chandler”);

can someone tell me what is wrong in this code?
im trying to print the name whose length is greater than 5.


#2

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.