Skip to content
Advertisement

Why does returning a console.log() return undefined?

this is my code, my last console.log return an undefined result, can you help me to understand why?

I don’t really understand why this happened but I’m sure that is a really stupid thing

also, this is the input(elem_riga)

JavaScript
JavaScript

Advertisement

Answer

most_common() and most_uncommon() shouldn’t return the result of console.log(), they should return the variables filtro_uno and filtro_due.

xygen_generator_rating() and co2_scrubber_rating() need to return the results of the ternaries.

JavaScript
User contributions licensed under: CC BY-SA
5 People found this is helpful
Advertisement