제시된 문제는
function solution(n) { for(var i = 1; i < n; i++){ if(n%i === 1){ return i; } } }
나름 쉬운 문제였다.