let tab1 = document.querySelector('#tab1');
let tab2 = document.querySelector('#tab2');
let tab3 = document.querySelector('#tab3');
let clearAll = function(){
[].forEach.call(document.getElementsByClassName('tab__btn'),(el) => {
el.classList.remove('active');
});
tab1.classList.remove('active');
tab2.classList.remove('active');
tab3.classList.remove('active');
}
let london = document.querySelector('#london').onclick = function () {
clearAll();
this.classList.toggle('active');
tab1.classList.toggle('active');
}
let tokyo = document.querySelector('#tokyo').onclick = function () {
clearAll();
this.classList.toggle('active');
tab2.classList.toggle('active');
}
let paris = document.querySelector('#paris').onclick = function () {
clearAll();
this.classList.toggle('active');
tab3.classList.toggle('active');
}