Writing JavaScript

JavaScript is not unlike C#. In fact, they both have their roots in Java. Hence, you will find many similarities—if you can read and write C#, you can read and write JavaScript. They both use brackets to group sections of code; end lines with semicolons; concatenate strings with +; use the logic operators && (and), || (or), ! (not); call properties and methods with dot notation; and use this as a keyword. The similarities continue from there: global and local scoping rules, switch statements, looping constructs (for...next, do ...while), conditions (If...Else), objects with properties and methods, functions with parameters, events, comments, operators, variables, functions, and more.

JavaScript does simplify data types using ...

Get Microsoft Visual Studio 2015 Unleashed, Third Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.