J
J
JSmol2019-02-26 14:45:44
JavaScript
JSmol, 2019-02-26 14:45:44

Why does the script work differently in Yandex Browser?

The data array of 3 items is loaded onto the page. Next, these item are added to another empty array.
In chrome, safari everything works fine. However, in Yandex Browser, all items are added to the second array twice

$.each(data, function (i, item) {
  console.log(data); //выводит 3 элемента
  allPriceItems.push( item );
  console.log(allPriceItems); // выводит 6 элементов
    });

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Pavel Kornilov, 2019-02-26
@KorniloFF

I don't see anything like that from YaB.
See for yourself - https://codepen.io/KorniloFF/pen/eXmYyL?editors=1111

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question