a simple Set class written in JavaScript