Javascript crash course for programmers
Created by w3resource.com / @w3resource JavaScript recognizes the following types of primitive values. A JavaScript variable must start with a letter (A-Z, a-z), underscore (_), or dollar sign ($), subsequent characters can also be digits (0-9). - Declaring variables - Use literals to represent values in JavaScript which are fixed values, not variables. The Boolean type has two literal values :
IntegersIntegers can be expressed in decimal (base 10), hexadecimal (base 16), and octal (base 8). An integer must have at least one digit (0-9).
Floating-point literalsA floating number has the following parts.
The exponent part is an "e" or "E" followed by an integer, which can be signed (preceded by "+" or "-"). ExpressionsAn expression is any valid unit of code that resolves to a value. Conceptually, there are two types of expressions: those that assign a value to a variable (a = 12) and those that simply have a value (5-3). Expression categories
OperatorsJavaScript has the following types of operators.
Arithmetic operatorsaddition (+), subtraction (-), multiplication (*), and division (/). In addition, JavaScript provides the following arithmetic operators.
Assignment operators (1/2)
Assignment operators (2/2)
Comparison Operators(1/2)
Comparison Operators(2/2)
Bitwise Operators(1/2)
Bitwise Operators(2/2)
Logical Operators
String OperatorsWhen working with JavaScript strings sometimes you need to join two or more strings together in to a single string. Joining multiple strings together is known as concatenation. The concatenation operator (+) concatenates two or more string values together and return another string which is the union of the two operand strings. Special OperatorsJavaScript has the following special operators.
new OperatorThe new operator is used to create an instance of a user-defined object type or of one of the predefined object types Array, Boolean, Date, Function, Image, Number, Object, Option, RegExp, or String. Syntax : var objectName = new objectType([param1, param2, ..., paramN]); this OperatorThe this operator is used to refer the current object. In general, this refers to the calling object in a method. Syntax : this["propertyName"]Label statementLabel statement provides an identifier for a statement that lets you refer to it using a break or continue statement. JS BinJavaScript ObjectsIn JavaScript all values except the primitive types of JavaScript (true, false, numbers, strings, null and undefined) are objects. Here objects contain -> propertyName: propertyValue pairs. Predefined Core ObjectsJavaScript has the following predefined objects.
Thank you for your time and attention, Go to Home page How long does it take to learn JavaScript for a programmer?If you're learning on your own, it can take six to nine months to become proficient in JavaScript. Some of that time is spent learning how to think like a programmer — helpful for when you move on to learning other programming languages.
Can I master JavaScript in 3 months?However, unlike CSS and HTML, JavaScript is not something that can be aced in just two weeks. But, it can be done in just three months! Most employers will be happy to hire you as their web developers if you just master some of the JavaScript basics. Of course, learning never stops.
Can I learn programming with JavaScript?That said, JavaScript's appeal isn't confined to its functionality. It's also one of the most intuitive programming languages to learn and use; often, it's one of the first that newbie developers learn when they start to code. “JavaScript is very easy to implement,” writes one tech journalist for Web Platform.
Can I learn JavaScript in 2 months?While JavaScript is a step up from the most fundamental web development skills (languages like HTML and CSS, which can be learned in under a month), you can still expect to learn JS basics in a matter of months, not years—and that's whether you learn through online classes or teach yourself through book study.
|