{"size": 1081, "ext": "js", "max_stars_repo_path": "Aula14ex/ex016/script.js", "max_stars_repo_name": "MarcosGPinheiro/JavaScript", "max_stars_repo_stars_event_min_datetime": null, "max_stars_repo_stars_event_max_datetime": null, "max_issues_repo_path": "Aula14ex/ex016/script.js", "max_issues_repo_name": "MarcosGPinheiro/JavaScript", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "Aula14ex/ex016/script.js", "max_forks_repo_name": "MarcosGPinheiro/JavaScript", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": null, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 36.0333333333, "max_line_length": 87, "alphanum_fraction": 0.5309898242}
function contar() {
    let inicio = window.document.getElementById('txtIni')
    let fim = window.document.getElementById('txtFim')
    let passo = window.document.getElementById('txtPasso')
    let res = window.document.querySelector('div#res')
    if (inicio.value.length == 0 || fim.value.length == 0 || passo.value.length == 0) {
        res.innerHTML = 'Impossível contar!'
        alert('[ERRO] Faltam dados!')
    } else {
        res.innerHTML = 'Contando: <br>'
        let nIni = Number(inicio.value)
        let nFim = Number(fim.value)
        let nPasso = Number(passo.value)
        if (nPasso <= 0) {
            window.alert('Passo invalido. Considerando Passo 1')
            nPasso = 1
        }
        if (nIni < nFim) {
            for (let cont=nIni; cont<=nFim; cont+=nPasso) {
                res.innerHTML += ` ${cont} \u{1F449}`
            }            
        } else {
            for (let cont=nIni; cont>=nFim; cont-=nPasso) {
                res.innerHTML += `${cont} \u{1F449}`
            }
        }

        res.innerHTML += `\u{1F3C1}`
    }
}