JSFiddle - React, Tailwind, and code Playground

JavaScript

let fruit = 'apple';

let object = {
    vegetables: 'onion',
    fruit,
    berry: 'cherry',
}

for (let key in object) {
    console.log(object[key]);
}