How to implement Set of ES6 without using ES6

such as the title. If you implement ES6 built-in feature Set, without using other es6 API (such as Map)
if you want to write a Set that class imitates, should the underlying data structure use array or Object?

Mar.16,2021

  • if Key is a string, use Object
  • if it's any type, we have no choice but to use arrays, but. If the amount of data is large, the efficiency will certainly be relatively low
MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3869e-2c10a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3869e-2c10a.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?