I wrote the below code in my JS file and IE is giving error for the argument 'searchMap' when I am assigning value for it in the function.
mapping: function (mappingObj,searchMap=false) {
// code
}
Error is : Expected ')'
I wrote the below code in my JS file and IE is giving error for the argument 'searchMap' when I am assigning value for it in the function.
mapping: function (mappingObj,searchMap=false) {
// code
}
Error is : Expected ')'
You're using default parameter. It is a feature of ES6, and currently not yet supported by IE.
I'd suggest to convert your code to ES5, like..
mapping: function (mappingObj, searchMap) {
if (!searchMap) searchMap = false;
}
var searchMap = false;
mapping: function(mappingObj, searchMap) {
// code
}
mapping(mappingObj, searchMap);