Solves code problem in Ruby and JavaScript