loading...

re: Daily Challenge #17 - Double Trouble VIEW POST

FULL DISCUSSION
 
queue = ["Sheldon", "Leonard", "Penny", "Rajesh", "Howard"];

for (i=0; i<n; i++) {
    curr = queue.shift();
    queue.push(curr, curr);
}

result = queue.pop();
code of conduct - report abuse