Briefly
The size
property contains the number of values in the Set
collection. It is read-only.
Example
const watchList = new Set()console.log(watchList.size)// 0watchList.add('Fight Club')console.log(watchList.size)// 1
const watchList = new Set() console.log(watchList.size) // 0 watchList.add('Fight Club') console.log(watchList.size) // 1