{"action":"closed","issue":{"url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7900","repository_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp","labels_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7900/labels{/name}","comments_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7900/comments","events_url":"https://api.github.com/repos/FreeCodeCamp/FreeCodeCamp/issues/7900/events","html_url":"https://github.com/FreeCodeCamp/FreeCodeCamp/issues/7900","id":145875012,"number":7900,"title":"Wrong output","user":{"login":"LucasIsasmendi","id":4970546,"avatar_url":"https://avatars.githubusercontent.com/u/4970546?v=3","gravatar_id":"","url":"https://api.github.com/users/LucasIsasmendi","html_url":"https://github.com/LucasIsasmendi","followers_url":"https://api.github.com/users/LucasIsasmendi/followers","following_url":"https://api.github.com/users/LucasIsasmendi/following{/other_user}","gists_url":"https://api.github.com/users/LucasIsasmendi/gists{/gist_id}","starred_url":"https://api.github.com/users/LucasIsasmendi/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/LucasIsasmendi/subscriptions","organizations_url":"https://api.github.com/users/LucasIsasmendi/orgs","repos_url":"https://api.github.com/users/LucasIsasmendi/repos","events_url":"https://api.github.com/users/LucasIsasmendi/events{/privacy}","received_events_url":"https://api.github.com/users/LucasIsasmendi/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2016-04-05T03:26:49Z","updated_at":"2016-04-05T16:44:14Z","closed_at":"2016-04-05T16:44:14Z","body":"Challenge [Global Scope and Functions](https://www.freecodecamp.com/challenges/global-scope-and-functions#?solution=%2F%2F%20Declare%20your%20variable%20here%0Avar%20myGlobal%20%3D%2010%3B%0A%0Afunction%20fun1()%20%7B%0A%20%20%2F%2F%20Assign%205%20to%20oopsGlobal%20Here%0A%20%20oopsGlobal%20%3D%205%3B%0A%7D%0A%0A%2F%2F%20Only%20change%20code%20above%20this%20line%0Afunction%20fun2()%20%7B%0A%20%20var%20output%20%3D%20%22%22%3B%0A%20%20if%20(typeof%20myGlobal%20!%3D%20%22undefined%22)%20%7B%0A%20%20%20%20output%20%2B%3D%20%22myGlobal%3A%20%22%20%2B%20myGlobal%3B%0A%20%20%7D%0A%20%20if%20(typeof%20oopsGlobal%20!%3D%20%22undefined%22)%20%7B%0A%20%20%20%20output%20%2B%3D%20%22%20oopsGlobal%3A%20%22%20%2B%20oopsGlobal%3B%0A%20%20%7D%0A%20%20console.log(output)%3B%0A%7D%0A) has an issue.\r\nUser Agent is: <code>Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/49.0.2623.110 Safari/537.36</code>.\r\nPlease describe how to reproduce this issue, and include links to screenshots if possible.\r\n\r\nMy code:\r\n```javascript\r\n// Declare your variable here\r\nvar myGlobal = 10;\r\n\r\nfunction fun1() {\r\n  // Assign 5 to oopsGlobal Here\r\n  oopsGlobal = 5;\r\n}\r\n\r\n// Only change code above this line\r\nfunction fun2() {\r\n  var output = \"\";\r\n  if (typeof myGlobal != \"undefined\") {\r\n    output += \"myGlobal: \" + myGlobal;\r\n  }\r\n  if (typeof oopsGlobal != \"undefined\") {\r\n    output += \" oopsGlobal: \" + oopsGlobal;\r\n  }\r\n  console.log(output);\r\n}\r\n\r\n```\r\nThe output in chrome and firefox is 10, because oppsGlobal in undefined, not `myGlobal :10  oppsGlobal: 5` which is the current (wrong) result. It is a conceptual issue.\r\n"}}