The Object getOwnPropertyNames() static method returns an array of all the properties found in a given object.

    
    const flight = {
      start: "Detroit",
      end: "Miami",
      airline: "Delta",
      jet: 767
    };

    const flightObjOwnPropNames = Object.getOwnPropertyNames(flight);

    console.log(flightObjOwnPropNames);
    // ["start", "end", "airline", "jet"]