JSFiddle - React, Tailwind, and code Playground

by Michael Prosser

JavaScript

var LUBRICATION = function(data){

	console.log(data);	

	for(let i = 0;i<data.length;i++){
  
  	console.log("i",i);
    console.log("data[i].name",data[i].name);
  	console.log("data[i].price",data[i].price);
  	console.log("data[i].inventory",data[i].inventory);
  
  }

}

var theData = [
	{
  	name: "The Game 1",
    price: 11.99,
    inventory: 109
  },
  {
  	name: "The Game 2",
    price: 16.99,
    inventory: 109
  },
  {
  	name: "The Game 3",
    price: 21.99,
    inventory: 109
  }
];

var lube = new LUBRICATION(theData);