function countingoff(count, steps) {
var people = []
while (count) { people.unshift(count--)}
var idx = 0
while (people.length) {
idx = (idx + steps - 1)%people.length
console.log("removed: #", people.splice(idx, 1)[0], ", left: ", people)
}
}
// example
countingoff(25, 7)