title: "Navigator is not defined" JSHint, forecast API with JSON
body: <p>For a school assignment we have to build a small app prototype which interfaces with the Forecast.io api. I have little experience with APIs but everything in the code seems to be clean and okay.</p>
  
  <p>However, in Brackets, JSHint keeps telling me "Navigator not defined (W117)". Furthermore, console.log statements don't work in several functions and the browser doesn't ask me to share my location. I tried copying exact code and had the same reults.</p>
  
  <p>None of the console logs in the file return anything, I have no way of checking if my browser even gets location data.</p>
  
  <pre><code>//JSON declareren
  (function () {
      'use strict';
      /*global $, jQuery, console, alert*/
      //Variabelen invoegen
      var latitude, longitude, url, App, myApp, day, days, month, months, year, years, dateTime, getTest, date, Location, myLocation;
  
  
  App = function () {
      this.getLocation = function () {
          if (navigator.geolocation) {
              console.log("Geofix werk");
              navigator.geolocation.getCurrentPosition(this.updateWeather);
          } else {
              alert("Geolocation fix fail");
  
          }
      };
  
      this.updateWeather = function (posn) {
          console.log("Position OK");
          latitude = posn.coords.latitude;
          longitude = posn.coords.longitude;
          console.log(latitude);
          console.log(longitude);
  
          url = "https://api.forecast.io/forecast/412e0bc4cc3095a2de7d0bdf663f4e3e/" + latitude + ',' + longitude + "?units=si";
  
          $.ajax({
              url: url,
              dataType: 'jsonp',
              type: 'GET',
              success: function (resp) {
                  console.log(resp);
                  date = new Date();
                  getTest = date.getDate();
                  day = date.getDay();
                  month = date.getMonth();
                  year = date.getFullYear();
  
                  //arrays invoegen
                  days = ["Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday", "Sunday"];
  
                  months = ["January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"];
  
              }
          });
      };
  };
  
  myLocation = new App();
  myLocation.getCurrentLocation();
  
  }());
  </code></pre>