You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
class Parcial {
constproperty cantidadPreguntas
}
class Alumno {
const notas = []
var tipoAlumno ="E"method rendir(nota) {
notas.add(nota)
}
method estudiaPara(parcial) {
if (tipoAlumno =="E") {
// Estudiosoreturntrue
}
if (tipoAlumno =="V") {
// Vagoreturn notas.last() <6
}
if (tipoAlumno =="H") {
// Hijo del rigorreturn parcial.cantidadPreguntas() >5
}
returnfalse
}
}
está saltando en el último if esta validación: Estás usando incorrectamente el if. Devolvé simplemente la expresión booleana.(shouldUseConditionalExpression). Raro.