Monthly Archives: May 2015

JavaScript- JavaScript in Web Browsers – Chapter 4

Synchronous, Asynchronous, and Deferred Scripts: Defer: <script src=“demo_defer.js” defer></script> A script that will not run until after the page has loaded. Async: The script will be run async as soon as it is available.

Posted in JavaScript, MyStudy | Tagged | Leave a comment

JAVASCRIPT – Functions – CHAPTER 3

A function is a block of Javascript code that is defined once and called many numbers of times. Defining Functions: function callMe(index){ var a=index; console.log(a); } callMe(5);//Invoking functions //Object Literals var o{ var a; add:function(){ this.c=this.a+2; } }; o.add(); –Chapter … Continue reading

Posted in MyStudy | Leave a comment

JAVASCRIPT – Arrays – CHAPTER 2

An Array is a collection of values. Each value are accessed by index value. Creating Arrays: var empty = []; // An array with no elements var primes = [2, 3, 5, 7, 11]; // An array with 5 numeric elements … Continue reading

Posted in MyStudy | Leave a comment