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.
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"

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