JSFiddle - React, Tailwind, and code Playground

by kplatova

JavaScript

const animals = [
	{age: 5, type: 'dog'},
  {age: 10, type: 'cat'},
];

animals.filter(
	(item) => item['age'] > 7
);

animals.filter(
	({ age }) => age > 7
);


{ age } = item