Home » Articles, Featured

CodeAcademy DetectGoodInput Lesson

In the lesson for Basic Functions: Javascript Quick Start: Start Guide, part 4, Return Values:

The presented problem:

// If value is falsy…

The instructions give a hint on what to add, or rather what NOT to add:

You do not need to have Return ‘undefined’; as part of the IF statement.
so,

if (is falsy and not a string){} // put NOTHING in the {}

else
return ‘good input!’;

http://www.codecademy.com/courses/javascript-intro/4#!/exercises/3

function detectGoodInput

www.BlueGreenWeb.com
Tampa Bay Florida web maintenance service - Wordpress