Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js conditional object

const object = {
  ...bool && { foo: 2 },
}
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #js #conditional #object
ADD COMMENT
Topic
Name
4+8 =