IE11 Invalid value on the left side of the assignment, how to fix it?

  • 0
    Tell me how to fix this line so that IE11 doesn't swear at it?
    There is such a line in the function,
    function(fd, date, inst) {
    .....
    const arr_date1 = [date_from, date_to] = fd.split(',');
    ....
    }


    the date arrives in fd just 10/02/2020, 10/17/2020. All browsers are fine, but IE swears at the line const arr_date1 = [date_from, date_to] = fd.split (',');
    Writes "Invalid value on the left side of the assignment" what's wrong, how to fix it? Can not understand :(
    JavaScript Juliette Avery, Jan 19, 2019

  • 1 Answers
  • 0
    IE11 can't do destructuring assignment .



    Also, you should note that with this entry, date_from and date_to will be global variables.
    Anonymous

Your Answer
To place the code, please use CodePen or similar tool. Thanks you!