Good evening, how can I check the elements of two arrays in javascript?
We have one array, full of links. Assume:
var one=['mail.ru','google.com','yandex.ru','rambler.ru'];
And another, 'dynamic' array with at least 1, maximum 3 elements, depending on the situation .. Also contains links.
var two=['google.com','rambler.ru']; //ΠΏΡΠΈΠΌΠ΅Ρ Ρ 2-ΠΌΡ Π΅Π»Π΅ΠΌΠ΅Π½ΡΠ°ΠΌΠΈ
It is necessary to somehow check whether the elements of the second array coincide with the first, and if so (I have 2 elements in the example), let them know what, for example, the indexes of the elements in the 1st array.
Tried to do something through the usual for and if, but got confused = \