Would you like to clone this notebook?

When you clone a notebook you are able to make changes without affecting the original notebook.

Cancel

test 01

node v14.20.1
version: 6.0.0
endpointsharetweet
class Persona { constructor(nome, cognome) { this.name = nome; this.surname = cognome; } restituisciNome() { return this.name; } restituisciCognome() { return this.surname; } restituisciNomeCompleto(){ let nomeCompleto = this.name +' '+ this.surname; return nomeCompleto; } votoEsame(esito){ let text; if(esito == 30){ text = this.name + ' è tanto felice'; }else if(esito >= 18){ text = this.name + ' è felice'; }else if(esito < 18){ text = this.name + ' non è felice'; }else{ } return text; } } let persona = new Persona('Roberta', 'Marcuzzi'); console.log(persona.restituisciNomeCompleto()); console.log(persona.votoEsame(30));
Loading…

no comments

    sign in to comment