1

I've tested the following code on every browser, and only Internet explorer says its expect an identifier. I've been through many sites but i cant find the answer by myself.

    var ref = firebase.database().ref("products");
ref.once("value",  function(snapshot)  {

   let profiles2 = []
      snapshot.forEach( function(profile) {
       let {url,mobile2} = profile.val();
        profiles2.push({url,mobile2}) 
})
})

Im glad for every answer!

Frank van Puffelen
  • 565,676
  • 79
  • 828
  • 807

1 Answers1

0

It might be due to IE not supporting ES6 fully. You can use babel to compile your code to ES5 to make sure it is supported by all browsers.

What browsers currently support JavaScript's 'let' keyword?

negool
  • 59
  • 4