JSFiddle - React, Tailwind, and code Playground

by Ada Gonzalez

HTML

<body>
    
<h2>Weather in North America Major Cities</h2>

</body>

CSS

h2 {
    font-family:"arial";
    text-align: center;
}
body {
    font-family:"arial";
    margin-left: 40px;
}

JavaScript

function askforcity() {
    var weatherapp = [{
        "coord": {
            "lon": -79.42,
                "lat": 43.7
        },
            "sys": {
            "message": 0.4954,
                "country": "CA",
                "sunrise": 1392811747,
                "sunset": 1392850422
        },
            "weather": [{
            "id": 800,
                "main": "Clear",
                "description": "Sky is Clear",
                "icon": "01n"
        }],
            "base": "cmc stations",
            "main": {
            "temp": 269.71,
                "humidity": 99,
                "temp_min": 268.15,
                "temp_max": 271.15,
                "pressure": 1027.82
        },
            "wind": {
            "speed": 5.1,
                "deg": 226.502
        },
            "snow": {
            "3h": 0
        },
            "clouds": {
            "all": 0
        },
            "dt": 1392771827,
            "id": 6167865,
            "name": "Toronto",
            "cod": 200
    },

    {
        "coord": {
            "lon": -74.01,
                "lat": 40.71
        },
            "sys": {
            "message": 0.1984,
                "country": "United States of America",
                "sunrise": 1392810208,
                "sunset": 1392849365
        },
            "weather": [{
            "id": 802,
                "main": "Clouds",
                "description": "scattered clouds",
                "icon": "03n"
        }],
            "base": "cmc stations",
            "main": {
            "temp": 275.13,
                "pressure": 1019,
                "humidity": 69,
                "temp_min": 274.15,
                "temp_max": 276.15
        },
            "wind": {
            "speed": 3.1,
                "deg": 240
        },
            "snow": {
            "3h": 0
        },
            "clouds": {
            "all": 40
        },
            "dt": 1392767580,
            "id": 5128581,
           ...