JSFiddle - React, Tailwind, and code Playground
by Shawn Stark
JavaScript
emps = {"employees":[
{"firstName":"John", "lastName":"Doe"},
{"firstName":"Anna", "lastName":"Smith"},
{"firstName":"Peter", "lastName":"Jones"}
]}
function alertProperty(myEmps){
var theEmps = myEmps;
return function(){console.log(theEmps.employees[0].firstName)};
}
test1 = alertProperty(emps);