для оформления однострочных комментариев или превращения в коммент. одной строчки кода
многострочные и внутристрочные комментарии
Adds two values together or concatenates two strings into a single string.
добавление двух значений одновременно или связки двух строк в одну
Subtracts the value of a number from another number.
вычитание чисел
Multiples the values of two numbers.
умножение чисел
Divides a number by another number.
деление чисел
Divides a number by another number and returns the remainder.
"возвращает" остаток от деления одного числа на другое
синтаксис: numberA % numberB
пример: myModulus = 11 % 2;
//myModulus = 1;
Increments the value of a number by 1.
увеличивает значение числа на 1. то же, что +1
синтаксис: number++ или ++number
пример: var myNumber = 3;
myNumber++;
// myNumber = 4;
Decrements the value of a number by 1.
уменьшает значение числа на 1
Changes the sign of a signed integer.
изменение знака целого числа на противоположный
синтаксис: -number
пример: var myNumber = 3;
-myNumber; // myNumber = -3;
Assigns a value to a variable or other object.
присваивает значение переменной или другому объекту
Adds the value of the first item to the second item and assigns the total to the first item as a new value.
сумму прервого и второго присваивает первому в качестве нового значения
синтаксис: valueA += valueB
пример: var foo = 7;
var bar = 3;
foo += bar; //now foo = 10;
Subtracts the value of the second item from the first item and assigns the total to the first item as a new value.
вычитает значение второго элемента из первого. полученный результат присваивается первому в качестве нового значения.
Multiples the value of the first item by the second item and assigns the total to the first item as a new value.
перемножает значения первого и второго элемента. полученный результат присваивается первому в качестве нового значения.
Divides the value of the first item by the second item and assigns the total to the first item as a new value.
значение первого элемента делится на значение второго. полученный результат присваивается первому в качестве нового значения.
Shifts the first item in binary representation the value of the second item of bits to the right, discarding bits shifted off, and assigns the new value to the first item.
Shifts the first item in binary representation the second item of bits to the left, shifting in zeros from the right, and assigns this total to the first item.
Shifts the first item in binary representation the value of the second item bits to the right, discarding bits shifted off, shifting in zeros from the left, and assigns this total to the first item.
Returns the value of the first item one in each bit position for which the corresponding bits of both operands are ones, and assigns the new value to the first item.
Returns the value of the first item one in each bit position for which the corresponding bits of either or both operands are ones, and assigns the new value to the first item.
Returns the value of the first item one in each bit position for which the corresponding bits of either but not both operands are ones, and assigns the new value to the first item.
Returns the value of the first item one in each bit position for which the corresponding bits of both operands are ones.
значени
Returns the value of the first item one in each bit position for which the corresponding bits of either or both operands are ones.
значени
Returns the value of the first item one in each bit position for which the corresponding bits of either but not both operands are ones.
Reverses the bits of the value.
Shifts the first item in binary representation the second item of bits to the left, shifting in zeros from the right.
No description provided.
Shifts the first item in binary representation the value of the second item bits to the right, discarding bits shifted off, shifting in zeros from the left
Returns true if both values are equal.
"возвращает" - "верно", если два значения равны
Returns true if the two values are not equal.
"возвращает" - "верно", если два значения не равны
Returns true if both values are of the same type and are equal.
"возвращает" - "верно", если оба значения одного типа и равны
Returns true if the two values are either of different types or are different values.
"возвращает" - "верно", если значения не равны, либо разного типа.
Returns true if the value of the first item is greater than the value of the second item.
"возвращает" - "верно", если значение первого элемента больше, чем значение второго.
Returns true if the value of the first item is greater or equal to than the value of the second item.
"возвращает" - "верно", если значение первого элемента больше или равно, чем значение второго.
Returns true if the value of the first item is less than the value of the second item.
возвращает "верно", если значение первого элемента меньше значения второго
Returns true if the value of the first item is less than or equal to the value of the second item.
Returns true if both the first and second expression evaluate to true.
возвращает "верно", если оба выражения верны
Returns true if either the first or second expression evaluate to true.
возвращает "верно", если одно из выражений верно
Inverts the boolean value of the expression.
инвертирует
булево значение выражения (меняет "верно" на "неверно" и наоборот)
, (запятая)
ну просто запятая. типа, теперь делаем что-то А и что-тоВ
Breaks out of the current loop, switch, or labeled statement.
задает выход из цикла
Declares a read-only constant.
заявляет о констатне
Evaluates an expression, and does the first statement if the expression is true, or the second statement if the expression is false.
определяет значение выражения. если оно верно, выполняет первый оператор, если ложно - второй. (Shortcut for the "if" statement.)
In a while loop, jumps back to the condition statement. In a for loop, jumps to the update statement.
Deletes an object, a property of an object, or an element in an array at the specified index.
операция выполняется, пока верно определенное выражение/условие
от порядка действий зависит результат:
пример1: i=1
do {
document.write(i + ",");
i += 2;
} while (i < 20); //Alerts "i" until "i" reaches 20.
присваивается значение переменной i
выполняется операция (в данном случае печатается значение переменной)
изменяется значение i
проверка, удовлетворяет ли новое значение условию i<20
если да - опять выполняется операция, нет - выход из цикла
пример2: i=1
do {
i += 2;
document.write(i + ",");
} while (i < 20); //Alerts "i" until "i" reaches 20.
присваивается значение переменной i
изменяется значение i
выполняется операция (в данном случае печатается значение переменной)
проверка, удовлетворяет ли новое значение условию i<20
если да - опять изменяется значение i и выполняется операция
Allows properties, functions, and objects from one script to be accessed by other scripts.
пример: for(i=0;i<10;i++)
doSomething();
после присвоения переменной начального значения
выполняется следующая строка, затем
выполняется операция с i (в данном случае приращение )
затем проверка условия. если оно верно - выполняется тело цикла (следующая строка, к-рой здесь нет)
цикл выполняется пока переменная меньше 10.
Loops through the properties of an object.
Declares a function.
If the expressionA is true, executes statementA. If the expression is false, evaluates expressionB. If expressionB is true, executes statementB. Otherwise, executes statementC.
Imports properties, functions, and objects from a script that has exported them.
Returns true if the specified property name can be found in the specified object.
Returns true if the specified object is of the specified object type.
Labels a statement with an identifier.
Labels a statement with an identifier.
Creates an instance of an object type that has a constructor function.
Specifies the value to be returned by a function.
Evaluates an expression, and executes the statement(s) associated with the appropriate case for the value of the expression.
Refers to the calling object of a property.
Specifies an exception to throw when an error occurs.
Tries to execute the tryStatment, and executes the appropriate catch statement if there is an exception.
Returns the type of the specified variable.
Declares a variable and sets its initial value (if specified).
Evaluates the specified expression without returning a value.
Executes a statement while the specified expression is true.
операция выполняется, пока верно определенное выражение/условие
синтаксис: while (условие)
statement
пример1: n = 0;
while (n < 20) {
n ++;
doSomething(); //Will "doSomething" three times--until n is no longer less than three.
}
если n<20, прибавляем единицу и выполняем следующую строку.
полученная последовательность будет начинаться с n+1,
пример2: n = 0;
while (n < 20) {
doSomething(); //Will "doSomething" three times--until n is no longer less than three.
n ++;
}
в этом примере
n+1 идет после выполнения doSomthing,
проверка n<20 - после n+1
полученная последовательность будет начинаться с
первого, присвоенного значения переменной
Temporarily modifies the scope chain of a statement.
Generator that returns the value for each step in a loop.