 
      
    JavaScript
- 6 ответов
- 0 вопросов
    2
    Вклад в тег
    
      
      
    
  
  
let d19 = ['Your', 'payment', 'method', 'will', 'automatically', 'be', 'charged', 'in', 'advance', 'every'];
let maxString = '';
let out19 = document.querySelector('.out-19');
function f19() {
    for (i = 0; i < d19.length; i++) {
        if (d19[i].length > maxString.length) {
            maxString = d19[i]
        }
    }
    out19.innerHTML = maxString;
}
document.querySelector('.b-19').onclick = f19;function f9() {
    let inp9 = document.querySelector('.i-9').value;
    let out9 = '';
    for (let key in a9) {
        if (inp9 == a9[key]) {
            out9 += key + ' ';
        }
    }
    document.querySelector('.out-9').innerHTML = out9;
}
document.querySelector('.b-9').onclick = f9;