How to use the new repl.it?

So I am wondering how to use the new repl.it because when I click run, nothing happens. This is unlike before when it ran all of your code and a console.log() would log them onto the console.

Click here to run code

let genList = (num) => {
  let list = []
  for (let i =2; 2<=num; i++) {
    list.push[i]
  }
  return list
}
let primeList = genList(50)
console.log(primeList)

I have no idea why this is happening.

When I use the prompt() function I also get a undefined error despite it being a function built into the editor.

Edit:

After a long enough time, I get this in the console:

repl process died unexpectedly, restarting…

You have an infinite loop: "2 <= num" will always be true.

1 Like

I fixed that, but why do I always get an empty array?

Brackets instead of parens

1 Like

Andddd i’m done coding for today.