Answers for "react map 2darray"

0

react map 2darray

import React from "react";

export default function App() {
  const cart = [
    ["Corn", "Potato", "Radish"],
    ["Tomato", "Graphes", "Mango"],
  ];
  return (
    <div>
      {cart.map((items, index) => {
        return (
          <ol>
            {items.map((subItems, sIndex) => {
              return <li> {subItems} </li>;
            })}
          </ol>
        );
      })}
    </div>
  );
}
Posted by: Guest on September-11-2021

Code answers related to "Javascript"

Browse Popular Code Answers by Language