Modo entrevista. Cronômetro de 3 min, sem dicas e sem autocompletar
Ball
FácilClasses3 min
Write a class Ball. Its constructor takes the ball type and stores it in the field ballType. If no type is given, the ball gets the type 'regular'.
Exemplos
new Ball().ballTypeRetorna 'regular'
new Ball('super').ballTypeRetorna 'super'
Carregando o editor...
- No argument gives a regular ball
- The type comes from the argument
Os testes ocultos rodam no envio