exercises done in javascript