hackerrank day 1: arithmetic operators problem solution in javscript