web_development:js:react:notes

React Notes

const name = "doppelmutzi";
const getRandomIndex = max =>  Math.floor(Math.random() * Math.floor(max))
const food = ["🥞", "🧇", "🍔", "🍟", "🍕"];
const getFood = index => food[index]
console.log(`Hello, my name is ${name} and I'm hungry for ${getFood(getRandomIndex(food.length))}`);
  • web_development/js/react/notes.txt
  • Last modified: 2020/10/26 00:07
  • by jimboobrien