JavaScript String Reference

JavaScript Strings A JavaScript string stores a series of characters like “John Doe”. A string can be any text inside double or single quotes: var carname = “Volvo XC60”; var carname = ‘Volvo XC60’; String indexes are zero-based: The first character is in position 0, the second in 1, and so on. For a tutorial about Strings, read our JavaScript […]

JavaScript Operators Reference

JavaScript operators are used to assign values, compare values, perform arithmetic operations, and more. JavaScript Arithmetic Operators Arithmetic operators are used to perform arithmetic between variables and/or values. Given that y = 5, the table below explains the arithmetic operators: Operator Description Example Result in y Result in x Try it + Addition x = y […]

JavaScript JSON Reference

JSON (JavaScript Object Notation) JSON is a format for storing and transporting data. JSON is text, and text can be transported anywhere, and read by any programming language. JavaScript Objects can be converted into JSON, and JSON can be converted back into JavaScript Objects. This way we can work with the data as JavaScript objects, with no complicated […]

JavaScript Error Reference

Error Object The Error object provides error information when an error occurs. Example In this example we have written “alert” as “adddlert” to deliberately produce an error. Return the error name and a description of the error: try { adddlert(“Welcome”); } catch(err) { document.getElementById(“demo”).innerHTML = err.name + “<br>” + err.message; } Try it Yourself » For a tutorial about JavaScript […]

JavaScript Boolean Reference

JavaScript Booleans JavaScript booleans can have one of two values: true or false. The Boolean() Function You can use the Boolean() function to find out if an expression is true: Example Boolean(10 > 9)       // returns true Try it Yourself » Or even easier: Example (10 > 9)              // also returns true 10 > 9                // also returns true Try it Yourself » For […]

JavaScript Array Reference

Array Object The Array object is used to store multiple values in a single variable: var cars = [“Saab”, “Volvo”, “BMW”]; Array indexes are zero-based: The first element in the array is 0, the second is 1, and so on. For a tutorial about Arrays, read our JavaScript Array Tutorial. Array Properties Property Description constructor Returns the function that […]

HTML Element Reference

HTML Tags Ordered Alphabetically = New in HTML5 Tag Description <!–…–> Defines a comment <!DOCTYPE> Defines the document type <a> Defines a hyperlink <abbr> Defines an abbreviation or an acronym <acronym> Not supported in HTML5. Use <abbr> instead. Defines an acronym <address> Defines contact information for the author/owner of a document <applet> Not supported in HTML5. Use <embed> or <object> instead. […]

Command Syntax Reference

Introduction SPSS ships with a manual called “Command Syntax Reference” (or CSR). Whenever you don’t know or understand something, this should usually be the first place to look. SPSS Command Syntax Reference SPSS comes with a syntax reference manual explaining all existing commands. This book (in .pdf format) is called the “Command Syntax Reference” and is mostly […]

JavaScript Date Reference

Date Object The Date object is used to work with dates and times. Date objects are created with new Date(). There are four ways of instantiating a date: var d = new Date(); var d = new Date(milliseconds); var d = new Date(dateString); var d = new Date(year, month, day, hours, minutes, seconds, milliseconds); For a tutorial about date and times, read our JavaScript Date Tutorial. Date Object Properties Property Description constructor Returns the function […]