Created and invoked two functions. Added new If

Tested both in browser using console.log and the results are correct.
Added an additional if statement.