📜  反转数组 java 脚本 - 任何代码示例

📅  最后修改于: 2022-03-11 14:55:26.289000             🧑  作者: Mango

代码示例2
import React, { Component } from 'react';

export default class Slideshows extends Component {
    constructor(){
        super();
        this.state = {
            data:[
                { "id": "1", "name": 'Robert', "age": "21" },
                { "id": "2", "name": 'Sam', "age": "33" },
                { "id": "3", "name": 'Jerry', "age": "42" },
            ]
        }
    }
    render() {
        const reverseData = this.state.map((data, i) => {
            return (
                
  • {data.name} | {data.age}
  • ) }) return (
      {reverseData}
    ) } }