title: Do I need to use strict statement for this function? It's also expecting a ':' instead of a '.' for window.onload?
body: <p>Do I need to use strict statement for these functions? It's also expecting a ':' instead of a '.' for window.onload? It also says 'e' is not defined however I'm using it as an function event. Plus an unrecoverable syntax error? This is just a simple audio player for a website.</p>
  
  <pre><code>var audio = new Audio();
  var audioPlayer = {
      albumId: 0,
      audioTrack: 0,
      currentFolder: "",
      albums: [
          {   
              artist: "Post Malone",
              album: "Beerbongs &amp; Bentleys",
              folder: "Beerbongs &amp; Bentleys",
              graphic: "Beerbongs &amp; Bentleys/b&amp;bart.png",
              songs: ["Better Now.mp3", "Psycho ft. Ty Dolla $ign.mp3", "Rockstar ft. 21 Savage.mp3"],
              songTitles: ["Better Now", "Psycho ft. Ty Dolla $ign", "Rockstar ft. 21 Savage"]
          }
      ],
      selectAlbum: function(e){
          console.log(audioPlayer.albumId);
          $("#tracks").empty();
          $("h1").text(audioPlayer.albums[audioPlayer.albumId].album);
          $("#track &gt; span").text(audioPlayer.albums[audioPlayer.albumId].songTitles[audioPlayer.audioTrack]);
          $(".album_cover &gt; img").attr("src", "albums/" + audioPlayer.albums[audioPlayer.albumId].graphic);
          $("#status").text("Ready to Play");
          $.each(audioPlayer.albums[audioPlayer.albumId].songTitles, function(index, item){
              $("#tracks").append("&lt;li&gt;" + audioPlayer.albums[audioPlayer.albumId].songTitles[index] + "&lt;/li&gt;");
          });
      },
      playAlbum: function(){
          audio.src = "../albums/" + audioPlayer.albums[audioPlayer.albumId].folder + "/" + audioPlayer.albums[audioPlayer.albumId].songs[audioPlayer.audioTrack];
          audio.play();
      },
      changeTrack: function(direction){
          console.log(direction)
          if(direction === "forward" &amp;&amp; audioPlayer.audioTrack &lt; audioPlayer.albums[audioPlayer.albumId].songs.length - 1){
              audioPlayer.audioTrack++;
          }
          if(direction === "back" &amp;&amp; audioPlayer.audioTrack &lt; audioPlayer.albums[audioPlayer.albumId].songs.length + 1){
              audioPlayer.audioTrack--;
          }
      },
  
      window.onload = function(){
      audioPlayer.selectAlbum()
      $("#status").text("Playing");
  }
  
      $(document).on("click", "#albums &gt; div &gt; button",
      function(e){
      var album = this.id.split("_");
      audioPlayer.albumId = parseInt(album[1]) - 1;
      audioPlayer.selectAlbum();
  });
  };
  </code></pre>