Accessibility

The following illustrates which statements/methods ignore Symbols and which do not.


RESETRUNFULL
<!DOCTYPE html><html><body><script>

var o = {a:10};var s = Symbol();o[s] = 20;// What ignore symbols:for (p in o) console.log(o[p]);    // 10console.log(JSON.stringify(o));  // {"a":10}console.log(Object.entries(o));  // [["a",10],...]console.log(Object.keys(o));     // ["a"]console.log(Object.values(o));   // [10]console.log(Object.getOwnPropertyNames(o));     // ["a"]// What do not ignore symbols:console.log(s in o);                        // trueconsole.log(o.hasOwnProperty(s));  // trueconsole.log(Object.getOwnPropertySymbols(o))                                                     //[Symbol()]console.log(Object.getOwnPropertyDescriptor(o,s));  // {value: 20, writable: true, enumerable: true, //
   configurable: true}console.log(Object.getOwnPropertyDescriptors(o));                                          // {a: Object, Symbol(): Object}

</script></body><html>