Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js enum

const daysEnum = Object.freeze({
  monday: 0,
  tuesday: 1,
  wednesday: 2,
  thursday: 3,
  friday: 4,
  saturday: 5,
  sunday: 6
});
Source by www.30secondsofcode.org #
 
PREVIOUS NEXT
Tagged: #js #enum
ADD COMMENT
Topic
Name
8+8 =