Liz Anaya Ramos
·Developer Community Manager @ Xano

Challenge #33 - Key Extractor

Objective: Extract the property names (keys) from an object and return them in an array.

  1. Define an Object:

    • Create an object named person with the following properties:

      • firstName with the value John

      • lastName with the value Doe

      • age with the value 30

      • occupation with the value Engineer

  2. Extract the Property Names:

    • Use a function to extract all the property names (keys) of the person object and store them in an array.

      • Return this array as a variable named keys_array.

  • Submit Your Result:

    • Submit your result contained in the variable keys_array.

Expected Result:

Submit the variable keys_array as your answer. See example below:


Install the snippet to get started: https://www.xano.com/snippet/XwN5GThx