Returns an array of all own symbol properties in the object.
getOwnPropertySymbols(object)
object
An object
An array of all own symbol properties in the object.
If the object has no own symbol properties, an empty array is returned.
let vehicle = {
speed: 10,
unit: "km/h",
[Symbol.toStringTag]: "Vehicle"
}
Object.getOwnPropertySymbols(vehicle)
[Symbol.toStringTag]