add js soltion to problem 10