JSFiddle - React, Tailwind, and code Playground

by Durtto

HTML

<script src="https://getfirebug.com/firebug-lite-debug.js"></script>

JavaScript

var Pessoa = function(nome, email) {
     this.nome =  nome;
  
     // verifica se o e-mail foi preenchido
     if (email) {
          this.email = email;    
     }
 
     this.fala = function(){
          console.log("Olá, meu nome é "+this.nome+" e meu email é "+this.email);
     };
};

Pessoa(Eduardo);