How to use the new repl.it?

How to use the new repl.it?
0

#1

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…


#2

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


#3

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


#4

Brackets instead of parens


#5

Andddd i’m done coding for today.