max = 50; for (let i = 1; i <= max; i++) { if (i % 3 === 0 && i % 5 === 0) { console.log("Fizz Buzz") } else if (i % 3 === 0) { console.log("Fizz") } else if (i % 5 === 0) { console.log("Buzz") } else { console.log(i) } } };
on the DSL available within this file, see http://guides.rubyonrails.org/routing.html namespace :book do get '/index', to: 'book#index' get '/search', to: 'book#search' end end