Added task 22 javascript solution