Currently I have a code that works for all browsers except internet explorer. I would like to find a way to ignore this code when I'm on the internet explorer, that is, I will not be shown any errors. what I want is to enclose my code in a kind of if or try catch and not run. What can I do?
I get this error:
SCRIPT1028: Se esperaba un identificador, una cadena o un número
var nombresColumnas=["data0","data1","data2","data3"];
var data= {
[nombresColumnas[0]]: '#33E789', //error here..!
[nombresColumnas[1]]: '#00CCFF',
[nombresColumnas[2]]: '#FFC33E',
[nombresColumnas[3]]: '#384858'
}
console.log(data)