Unexpected symbol with spread operator


#1

Hello everyone, I have recently discovered this tool and I would like to use it to add executable js code samples to my blog. Like this : https://codeburst.io/javascript-es6-the-spread-syntax-f5c35525f754. As I’m writing about the spread operator I tried the following example, however, I get an error saying '‘Unexepected symbol on line : x, y’.

If I rewrite the example from the runkit tool inside the page, I notice that the error doesn’t appear anymore. It seems like the dots on the first load of the page are not correct, in fact they take half of the space of the dots entered manually to try the examples. Maybe some problems with Wordpress ??

here is the example :

var arr = [2, 4, 8, 6, 0]; var max = Math.max(...arr);

console.log(max);