Modo entrevista. Temporizador de 3 min, sin pistas y sin autocompletado
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'.
Ejemplos
new Ball().ballTypeDevuelve 'regular'
new Ball('super').ballTypeDevuelve 'super'
Cargando el editor…
- No argument gives a regular ball
- The type comes from the argument
Las pruebas ocultas se ejecutan al enviar