Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

shorthand if in javascript with return

pet = pets.find(pet => pet.type ==='Dog' && pet.name === 'Tommy');
console.log(pet); // { type: 'Dog', name: 'Tommy' }
Source by www.sitepoint.com #
 
PREVIOUS NEXT
Tagged: #shorthand #javascript #return
ADD COMMENT
Topic
Name
4+8 =