JSFiddle - React, Tailwind, and code Playground

by Abdul Ahmad

JavaScript

const stuff = [1, 2, 3, 4];
const item = getItemFromStuff(stuff);

function getItemFromStuff(things) {
	console.log(things);
	return things.find((thing) => {
		if (thing === 3) return thing;
  });
}

console.log('thing', item);