fork download
  1. Season = Object.freeze({
  2. Summer: 1,
  3. Fall: 2,
  4. Winter: 3,
  5. Spring: 4
  6. });
  7.  
  8. //ECMAScript 6 feature
  9. let values = Object.keys(Season)
  10. .map(key => Season[key]);
  11. //values is [1,2,3,4]
  12.  
  13. console.log("values is", values);
Success #stdin #stdout 0.04s 16784KB
stdin
Standard input is empty
stdout
values is 1,2,3,4