JSFiddle - React, Tailwind, and code Playground

by Klawztro

JavaScript

function nova() {
    this.b = 30;
}

nova.prototype.test = function() {

    console.log(this.b);
    if (this.b == 0) {
        return;
    } else if (typeof this.b === 'undefined') {
        console.log('Erro, nao enxergo mais a classe!');
        console.log('typeof this => ' + typeof this + ', apesar do tipo ser objetct, o tipo dos arrays também são apresentados objects!');
        console.log('this.length => ' + this.length + ', tenho o tamanho, que e uma propriedade de um array');
        console.log('this.slice => ' + this.slice + ', mas nao tenho os metodos de um array! Ou seja, meu escopo é o pseudo-array arguments!');
        return;
    }
    
    else {
        this.b--;
        this.test();
        //arguments.callee();
    }

            

};


var j = new nova();
j.test();