Problem 20 in js