donr strave together release date code example
Example 1: dont starve together
mustHaveCheck = () => { throw new Error(‘Missing parameter!’);}methodShoudHaveParam = (param = mustHaveCheck()) => { return param;}
Example 2: dont starve together
const pets = [ { type: 'Dog', name: 'Max'}, { type: 'Cat', name: 'Karl'}, { type: 'Dog', name: 'Tommy'},]pet = pets.find(pet => pet.type ==='Dog' && pet.name === 'Tommy');console.log(pet); // { type: 'Dog', name: 'Tommy' }