Very simple script:
function foo(){
return "bar"
}
console.log( foo() );
console:
> bar // sanity test that proves everything's working
> foo(); // this guy is key!
> ReferenceError: foo is not defined
How should I call foo(); for debugging and experimentation purposes?
Is this not a practise? I love using IRB / Rails Console to verify my ruby code and want to do the same with JavaScript