Set implementation in JavaScript