Sololearn: Learn to Code
Novo curso! Todo programador deveria aprender IA generativa!
Experimente uma aula grƔtis
+ 4
Move class `Exams` definition up before the line where Exams.average() was invoked. I'm just guessing class definition must preceed its usage.
1st Feb 2023, 7:57 AM
Ipang
+ 3
Sony, Move your function call console.log(Exams.average(exam1, exam2, exam3)); To beneath the class definition and it runs fine šŸ‘. You canā€™t use hoisting with an unitialized class, this is because the class could be extended. Hopefully that makes sense.
1st Feb 2023, 8:13 AM
DavX
DavX - avatar