JSFiddle - React, Tailwind, and code Playground

by novikov433

HTML

<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <script>

        var chislo = prompt('Введите ко-во массивов');
        var massive = [];
        var apartment = massive.map(person =>{
            return massive.massive_flat.apartment_number++
        })

        for (let i=0; i < chislo; i++) {
            massive.push({
                adres_home: "Zvezdi 22", 
                    build_date: "1990",
                    number_floors: 300,
                        massive_flat: {
                            number_rooms: Math.floor(Math.random() * (4- 1)) + 1,
                            number_residents: Math.floor(Math.random() * (5- 0)) + 0,
                            total_area: Math.floor(Math.random() * (120- 40)) + 40,
                            number_flat: Math.floor(Math.random() * (25- 0)) + 0,
                            apartment_number: 0
                    }
            });
        }
        console.table(massive);


        const donations = [5, 20, 100, 80, 75];
        let total = donations.reduce((total,donation) => {
        return total + donation;
        }, 450);

    </script>
</body>
</html>