JSFiddle - React, Tailwind, and code Playground

by dmitri_pavlutin

JavaScript

const heroes = [
  { name: 'Batman' },
  { name: 'Joker' }
];

for (const { name } of heroes) {
  console.log(name); // logs 'Batman', 'Joker'
}