No need for intermediate variable
Use assert library for the test

Replace the console.logs :-p