Describe the bug
I marked the new block as Code block... then I pasted this code of ES6
To reproduce
1.- I created a code block
2.- I pasted
`function tableReady(arr) {
var nextIndex = 0;
return {
next() {
if(nextIndex < arr.length) {
return {value: arr.shift(), done: false}
} else {
return {done: true}
}
}
}
}
var waitingList = ['Sarah', 'Heather', 'Anna', 'Meagan'];
var iterateList = tableReady(waitingList);
console.log(`${iterateList.next().value}, your table is ready`);
console.log(`${iterateList.next().value}, your table is ready`);
console.log(`${iterateList.next().value}, your table is ready`);
console.log(`${iterateList.next().value}, your table is ready`);
console.log(`Is this finished? ${iterateList.next().done}`);
</script>
<title>Iterators</title>
Describe the bug I marked the new block as Code block... then I pasted this code of ES6 To reproduce 1.- I created a code block 2.- I pasted `function tableReady(arr) { var nextIndex = 0; return { next() { if(nextIndex < arr.length) { return {value: arr.shift(), done: false} } else { return {done: true} } } } }