Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Spread operator in PhpStorm

my problem is that PhpStorm "red strikes" a spread operator in this line : if(Math.max(...yearstab) !== (date + 2)). I'd like to know if you found a way to prevent problems like that. Thanks.

like image 999
Pierolain Avatar asked Feb 14 '26 13:02

Pierolain


1 Answers

Since spread operator was introduced in the ECMAScript 2015 (6th Edition, ECMA-262) you need to tell PhpStorm that you're using this version.

You can do this by going in the project settings, "Languages & Frameworks", "JavaScript" and set "JavaScript language version" to "ECMAScript 6"

Screenshot

like image 133
pnsh Avatar answered Feb 16 '26 03:02

pnsh



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!