ES6 Promise support

Hi there

I was trying to use Promise on a puzzle but, it seems it isn’t supported yet here, but I took a look at * Promise’s page at MDN * and it seems that only IE doesn’t supports it yet.

Anybody knows if I’m doing something wrong or it isn’t really supported here?

Thx a lot

In our case, we compile the code before executing it. This is not the browser who interpret it.

As you can see on our faq (https://www.codingame.com/faq), we are using Spider Monkey to compile JavaScript.
Though Firefox also use Spider Monkey, they also work on their own to support ES6 features before they are implemented in their compiler. That’s the case of Promise.

So, as Spider Monkey does not support Promise yet, there is no way we can compile it.

1 Like

If you really need a Promise in a puzzle, you can copy paste the Q library (implementation of Promise) at the start of your code. It will work.

2 Likes