Código index:
import User from "./User.js";
import Admin from "./admin.js";
import Prof from "./prof.js";
const novoAdmin = new Admin('Rodrigo', 'rodrigo@gmail.com', '22/02/2002')
console.log(novoAdmin)
novoAdmin.nome = 'Andre'
console.log(novoAdmin.nome)
const novoprof = new Prof('Carla', 'c@gmail.com', '25/09/1989')
console.log(novoprof)
const novoUser = new User('Rodrigo', 'R@gmail.com', '22/02/2002')
console.log(novoUser)
Resultado console:
User {}
Prof {}
Carla, c@gmail.com, 25/09/1989, Professor, true
Admin {}
Andre
Prof {}
User {}