Problem 13 in js
Ruby twelve