IE8 gives me the following error:
The object does not support this property or method on custom.js, line symbol 82
Here is the code with line numbers:
78 function transpose(chord, increment){ 79 var scale = ["C", "C#", "D", "Es", "E", "F", "F#", "G", "As", "A", "B", "H"]; 80 return chord.replace(/[CDEFGABH]#?s?/g, 81 function(match){ 82 var i = (scale.indexOf(match) + increment) % scale.length; 83 return scale[ i < 0 ? i + scale.length : i ]; 84 }); 85 }
What should I change for the code to work in IE8? It works correctly in Firefox / Chrome, as well as in IE9.
source share