Dont Repeat Yourself


Does anyone know the syntax for the Dont Repeat Yourself section. It is confusing to me.


Please post you code and your question. Don't just ask for answers, that is against forum rules.


There are two ways to write a function, one method is assigning a function to a variable, which will give it the name of the variable. The other is to use the function keyword.

I have heard it said that the benefit of assigning a function to a variable is that it gives it a scope, such as if you were to use it within another function, where the function statement makes the function global.


3 posts were split to a new topic: DRY: output is NaN instead of 25