-3

So I am using Chrome Version 47.0.2526.73 (64-bit), and testing my new code on chrome which;

function addRowLine(rowNum = 0, isVisible = false)
{
    console.log(rowNum);
}

And I got;

Uncaught SyntaxError: Unexpected token =(…)

But, this code works fine on Firefox 42.0

So, I just want to clarify if chrome doesn't support this feature yet? Or I am missing something.

choz
  • 17,242
  • 4
  • 53
  • 73
  • [MDN](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Functions/Default_parameters) says you need Chrome 49 and sometimes in Chrome you need to be in strict mode too. – jfriend00 Dec 21 '15 at 08:40

1 Answers1

2

Chrome 47 doesn't support this yet. It will be supported in Chrome 49.

You can find a compatibility table here: https://kangax.github.io/compat-table/es6/

yeouuu
  • 1,863
  • 3
  • 15
  • 32