100 chairs problem in JavaScript

Here's the 100 chairs problem in JavaScript.