learnJavascriptBasicsFirst
Lexical Structure of Javascript
Lexical Structure of Javascript Optional Semicolons There are two exceptions to the general rule that JavaScript interprets line breaks as semicolons when it... Read More
var a; // Declaration a = 0; // a has a value. // TYPES a = 2; // Numbers a = 0.01; // Both Integers and Real fall under Numbers a = "js"; // String Declarations using Single Quote a = 'js'; // String Declarations using Double Quote. a = true; // Boolean a = false; // alternate value of Boolean a = null; // null is a special value which means a null -- will talk more a = undefined; // undefined is similar to null -- will talk more.
An object is a collection of name/value pairs, or a string to value map
Array is a numerically indexed lists of values
//OBJECTS var book = { title : "JS", taf : true }; //Access book.title // Access with . or [ ] book["taf"] book.name = "JSBOOK"; // Add properties book.contents = {} ; // empty object //ARRAYS can be accessed only with indexes in square brackets. var primes = [2,3,4,5] primes[0] primes.length primes[primes.length - 1]
var coordinates = [ {x:0,y:0}, {x:1,y:1} ]; var data = { d1: [[1,2],[3,4]], d2: [[2,3],[4,5]] };
Lexical Structure of Javascript Optional Semicolons There are two exceptions to the general rule that JavaScript interprets line breaks as semicolons when it... Read More
Introduction to Javascript (My Understanding from different reads) Types It all starts with Data Types and following are them to start with. Declarations:... Read More
My First Experiment with Computers. preparing a Lab Manual I used IIT-BHU Library Computers which have Ubuntu OS, Which has proxy with username... Read More