Accessing an object I'm confused can any one solve this question?

let weather = {
  coordi: {
    long: -0.13,
    lat: 51.51,
  },
  weather: [
    {
      id: 300,
      main: "Drizzle",
      description: "light intensity drizzle",
      icon: "09d",
    },
  ],
  base: "stations",
  main: {
    temp: 280.32,
    pressure: 1012,
    humidity: 81,
    temp_min: 279.15,
    temp_max: 281.15,
  },
  visibility: 10000,
  wind: {
    speed: 4.1,
    deg: 80,
  },
  clouds: {
    all: 90,
  },
  dt: 1485789600,
  sys: {
    type: 1,
    id: 5091,
    message: 0.0103,
    country: "GB",
    sunrise: 1485762037,
    sunset: 1485794875,
  },
  id: 2643743,
  name: "London",
  cod: 200,
};

function exerciseOne(weather) {
  // Create a new variable called weatherForecast and set it to following string
  // which is created using `weather` parameter which is a JavaScript object
  // 'London is expected to have Drizzle and a temperature of 280.32 Kelvin'
  // (London, Drizzle and 280.32 should come from weather object passed)

  // Code above this line
  return weatherForecast;
}


from Recent Questions - Stack Overflow https://ift.tt/3kyA8cy
https://ift.tt/eA8V8J

Comments

Popular posts from this blog

Spring Elasticsearch Operations

Network Error and Timeout on Authorize.net JS

Object oriented programming concepts (OOPs)