Getting Started

Descrição

Getting Started with JavaScript
Deepak Kumar
Notas por Deepak Kumar, atualizado more than 1 year ago
Deepak Kumar
Criado por Deepak Kumar aproximadamente 7 anos atrás
10
0

Resumo de Recurso

Página 1

JavaScript is case-sensitive and uses the Unicode character set. In JavaScript, instructions are called statements and are separated by a semicolon (;). It is recommended to always add semicolons to end your statements; it will avoid side effects.Spaces, tabs and newline characters are called whitespace. The source text of JavaScript scripts gets scanned from left to right and is converted into a sequence of input elements which are tokens, control characters, line terminators, comments or whitespace.CommentsThe syntax of comments is the same as in C++ and in many other languages:// a one line comment /* this is a longer, multi-line comment */ /* You can't, however, /* nest comments */ SyntaxError */VariablesYou use variables as symbolic names for values in your application. The names of variables, called identifiers, conform to certain rules.A JavaScript identifier must start with a letter, underscore (_), or dollar sign ($); subsequent characters can also be digits (0-9). Because JavaScript is case sensitive, letters include the characters "A" through "Z" (uppercase) and the characters "a" through "z" (lowercase).There are three kinds of declarations in JavaScript: var : Declares a variable, optionally initializing it to a value. let : Declares a block scope local variable, optionally initializing it to a value. const : Declares a read-only named constant. You can declare a variable in three ways: With the keyword var. For example, var x = 42. This syntax can be used to declare both local and global variables. By simply assigning it a value. For example, x = 42. This always declares a global variable, if it is declared outside of any function. It generates a strict JavaScript warning. You shouldn't use this variant. With the keyword let. For example, let y = 13. This syntax can be used to declare a block scope local variable. See Variable scope below. Note: A variable declared using the var or let statement with no initial value specified has the value undefined. An attempt to access an undeclared variable will result in a ReferenceError exception being thrown. The undefined value behaves as false when used in a boolean context.

Semelhante

Getting Started in Blacksmithing
Khanh Khong
On-Boarding
sallyannmawby
Welcome to ExamTime!
Maya V.
Welcome to ExamTime!
Andrea Leyden
Welcome to ExamTime!
dirajen.pullay1
Princípios do Direito Tributário
Jessica Midori
Phrasal Verbs II
GoConqr suporte .
Cinética Química
Lorena Salvador
Resumo global da matéria de Biologia e Geologia (10.º e 11.º anos)_2
ana-carolina12re
Separação de Misturas
isabellatrindade
LIGAÇÕES QUIMICAS - flashcard
Lucas Cruz Vieira