const API_KEY = `xxxxxxxxxxxxxxxxx`;

generate_weather_data();

// ========= functions ==========
function city_setup() {
    const CITY_ARRAY = [
        'Seoul'
    ,   'Seattle'
    ,   'Goyang'
    ,   'London'
    ,   'Tokyo'
    ,   'Osaka'
    ,   'Busan'
    ,   'New York'
    ];
    return CITY_ARRAY;
}

function generate_weather_data() {
    let cities = city_setup();
    let API_LINK = ``;
    for (let i = 0i < cities.lengthi++) {
        API_LINK = `https://api.openweathermap.org/data/2.5/weather?q=${cities[i]}&appid=${API_KEY}`;
        fetch(API_LINK)
        .then(response => response.json())
        .then(data =>  
            console.log(`City: ${data.name} Weather: ${data.weather[0].main}` 
            ));
    }
}

console.log("hello from weather");




초보라 복잡한것도 딱히 없다...


복잡한게 없으니, 생각한대로 쉽게 구현되고 결과도 생각보다 잘 나온다...


재미 없을 수 가 없다...


반면 문과 는 어떻게 하면 남들과 다르게 쓸까, 다른 관점으로 볼까 하는거에 뇌를 쥐어 짜게 되서 재미가 없다...


후..........