Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

Return object in parenthesis to avoid it being considered a wrapping function body

const myFunction = () => ({ value: 'test' })

myFunction() //{value: 'test'}
Source by www.freecodecamp.org #
 
PREVIOUS NEXT
Tagged: #Return #object #parenthesis #avoid #considered #wrapping #function #body
ADD COMMENT
Topic
Name
8+4 =