0

I saw the usage of this syntax ";(($) => " in a web project, a freelancer helped me with. This keeps failing to work on IE. Works fine on chrome and other browsers. Is shown as a syntax error on IE.

The website uses Laravel, but this seems to me more of a javascript thing, maybe a closure or something?

This is what an example code looks like :

;(($) =>  {
  $.fn.UpdateEquipment = () => {
    return $(this).each(() => {
      let equipment = new Equipment;
      equipment.createEquipment();
      equipment.editEquipment();
      equipment.updateEquipment();
      equipment.deleteEquipment();
    });
  }

Can anyone help me on this, please?

Diwesh Saxena
  • 153
  • 1
  • 3
  • 10
  • It doesn't tell me how to make it IE compatible. – Diwesh Saxena Feb 10 '17 at 11:30
  • It does show the two comparable versions; `() => { ... }` equals `function () { ... }` (the latter being the good old Javascript way supported by IE). And it does explain when both are equal or different, so you can make a judgement on your specific case whether you need to take care of anything else. – deceze Feb 10 '17 at 11:34

0 Answers0