You're getting undefined after each of these because the function call expression has no value. Give it one by using the return statement.