Skip to content

Instantly share code, notes, and snippets.

@Nasseratic
Created April 16, 2018 22:42
Show Gist options
  • Save Nasseratic/56d2a618404d3be4cc89285aa98bd731 to your computer and use it in GitHub Desktop.
Save Nasseratic/56d2a618404d3be4cc89285aa98bd731 to your computer and use it in GitHub Desktop.
export default (() => {
let arr = [];
const items = [
{
url: "",
title: "VELVET PUMPS WITH BEJEWELED HEELS",
image: "images/4.jpg",
price: 520,
url: "",
like: 10,
comment: 10,
link: "dolcegabbana.com",
by: "Modasti retail - Modasti"
},
{
url: "",
title: "VELVET PUMPS WITH BEJEWELED HEELS",
image: "images/3.jpg",
price: 320,
url: "",
like: 20,
comment: 11,
link: "dolcegabbana.com",
by: "Modasti retail - Modasti"
},
{
url: "",
title: "VELVET PUMPS WITH BEJEWELED HEELS",
image: "images/1.jpg",
price: 120,
url: "",
like: 5,
comment: 2,
link: "dolcegabbana.com",
by: "Modasti retail - Modasti"
}
];
return (num) =>{
let arr = [];
for (let i = 0; i < num; i++) {
arr.push(items[Math.floor(Math.random() * 3)]);
}
return arr;
};
})();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment