Javascript Cheatsheet

Performance
   There is a lot of talking about how to test the real performance of javascript and for the most part I have no clue where to start as I write this. Hopefully that will change be the end, skip to it if you dont want to learn the process as well.
Fun Example 
function DisplayQuestions() {
   var Questions = new Array(20);
   Questions[0] = "Question #1";
   Questions[1] = "Question #2";
   Questions[2] = "Question #3";
   Questions[3] = "Question #4";
   Questions[4] = "Question #5";
   Questions[5] = "Question #6";
   Questions[6] = "Question #7";
   Questions[7] = "Question #8";
   Questions[8] = "Question #9";
   Questions[9] = "Question #10";
   Questions[10] = "Question #11";
   Questions[11] = "Question #12";
   Questions[12] = "Question #13";
   Questions[13] = "Question #14";
   Questions[14] = "Question #15";
   Questions[15] = "Question #16";
   Questions[16] = "Question #17";
   Questions[17] = "Question #18";
   Questions[18] = "Question #19";
   Questions[19] = "Question #20";
   var QCount = 0;

   while (QCount < 20) {
      QNumber = Math.round(20 * Math.random());
      if (null != Questions[QNumber]) {
  alert("Question number " + QCount + " = " + Questions[QNumber]);
  QCount++;
  Questions[QNumber] = null; // Dump this question - it's been displayed
      }
   }
}


http://stackoverflow.com/questions/9813047/id-option-hide-not-working-on-safari-chrome
http://stackoverflow.com/questions/22539815/arent-promises-just-callbacks
http://stackoverflow.com/questions/2051632/ie8-xss-filter-what-does-it-really-do
https://stackoverflow.com/questions/34323527/what-does-do-in-javascript
http://www.capitalone.io/blog/why-is-everyone-talking-about-isomorphic-javascript/
http://stackoverflow.com/questions/20877239/how-to-make-modal-dialog-open-at-page-load-in-bootstrap
http://stackoverflow.com/questions/21044798/how-to-use-formdata-for-ajax-file-upload
http://stackoverflow.com/questions/2320069/jquery-ajax-file-upload
http://stackoverflow.com/questions/9253784/error-in-rendering-partial-view
http://stackoverflow.com/questions/11966779/learning-webgl-and-three-js
https://loading.io/
http://stackoverflow.com/questions/1335851/what-does-use-strict-do-in-javascript-and-what-is-the-reasoning-behind-it
http://stackoverflow.com/questions/21671138/what-does-the-random-string-after-a-webkitformboundary-do-mean
http://stackoverflow.com/questions/9090577/what-is-the-http-header-x-xss-protection

Popular posts from this blog

UI-Bootstrap Collapsible Sticky Footer

Installing Windows on Acer chromebook 15 cb3-532

Aspetcore: NLog with Postgresql