- Add an input control (input/textarea) to allow entering text.
- On text change, a food emoji should be rendered for each WORD in the text.
- If the word length is ODD, print a PIZZA emoji 🍕
- If the word length is EVEN, print a BURGER emoji 🍔
- Each emoji should be separated by a <space>.
Example
input : I love Pizza and Burger
output : 🍕 🍔 🍕 🍕 🍔
NOTE: you can copy the emojis and directly use in your HTML/JSX.
Bonus: add a button to randomly fetch sentence from below API and covert it into food emojis.
API: https://baconipsum.com/api/?type=meat-and-filler&sentences=1