Reputation: 207
Problem
I have a bit of code that keeps throwing an Syntax error but only in IE. I ran the code in JSLint but it didn't help me understand the issue.
JavaScript
$('#sub').click(function() {
items = my_arr.filter(i => i.percent && i.unit);
console.log(items);
})
IE 11 (Error)
SCRIPT1002: Syntax error
File: scripts.js, Line: 3346, Column: 26
Upvotes: 3
Views: 2759
Reputation: 393
Check this ES6 Browser Compatibility table.
Arrow notation is ES6 feature and not supported by IE.
Upvotes: 3