4 ms·
>> Ignoring the return value from a non-void method. Beginners might also write a method/function with a return parameter they don't care about (or that they s
by 908B64B197 5y ago
>> Ignoring the return value from a non-void method.
Beginners might also write a method/function with a return parameter they don't care about (or that they sometimes don't care about) but that has some desirable side-effect.
- tsumnia 5y agoA common issue I've seen is more the return is replaced with a print statement. As a result, their code "appears" to working because they're still seeing the right values appear in their console when they run the code. If the function's returned value doesn't get used somewhere else, then they don't see where the issue is until points are deducted.