与 Adobe After Effects 脚本相关的基本 JavaScript 元素

作者猫斯基 2022-12-10 677 人读过

最新文章

关键字和语句语法

Keyword/Statement

Description

break

Standard JavaScript; exit the currently executing loop.

continue

JavaScript; cease execution of the current loop iteration.

case

Label used in a switch statement.

default

Label used in a switch statement when a case label
is not found.

do...while

Standard JavaScript construct. Similar to the while loop,
except loop condition evaluation occurs at the end of the
loop.

false

Literal representing the Boolean false value.

for

Standard JavaScript loop construct.

for...in

Standard JavaScript construct. Provides a way to easily
loop through the properties of an object.

function

Used to define a function.

if/if...else

Standard JavaScript conditional constructs.

new

Standard JavaScript constructor statement.

null

Assigned to a variable, array element, or object property
to indicate that it does not contain a legalvalue.

return

Standard JavaScript way of returning a value from a
function or exiting a function.

switch

Standard JavaScript way of evaluating a JavaScript
expression and attempting to match the expression’s value
to a case label.

this

Standard JavaScript method of indicating the current object.

true

Literal representing the Boolean true value.

undefined

Indicates that the variable, array element, or object
property has not yet been assigned a value.

var

Standard JavaScript syntax used to declare a local variable.

while

Standard JavaScript construct. Similar to the
do…whileloop, except loop condition evaluation occurs at
the beginning of the loop.

with

Standard JavaScript construct used to specify an object to
use in subsequent statements.

JavaScript运算符

Operators

Description

new

Create new object instance.

delete

Delete property from an object.

typeof

Returns data type.

void

Returns undefined value.

.

Object member.

[]

Array element.

()

Function call.

++

Pre- or post-increment.

--

Pre- or post-decrement.

-

Unary negation or subtraction.

~

Bitwise NOT.

!

Logical NOT.

*

Multiply.

/

Divide.

%

Modulo division.

+

Add.

<<

Bitwise left shift.

>>

Bitwise right shift.

>>>

Unsigned bitwise right shift.

<

Less than.

<=

Less than or equal.

>

Greater than.

>=

Greater than or equal.

==

Equal.

!=

Not equal.

&

Bitwise AND.

^

Bitwise XOR.

|

Bitwise OR.

&&

Logical AND.

||

Logical OR.

?:

Conditional (ternary).

=

Assignment.

+=

Assignment with add operation.

-=

Assignment with subtract operation.

*=

Assignment with multiply operation.

/=

Assignment with divide operation.

%=

Assignment with modulo division operation.

<<=

Assignment with bitwise left shift operation.

>>=

Assignment with bitwise right shift operation.

>>>=

Assignment with unsigned bitwise right shift operation.

&=

Assignment with bitwise AND operation.

^=

Assignment with bitwise XOR operation.

|=

Assignment with bitwise OR operation.

,

Multiple evaluation.

运算符优先级

Operators (highest precedence to lowest)

Associativity

[], (), .

left to right

new, delete, – (unary negation), !, type of, void , ++, –

right to left

*, /, %

left to right

+, – (subtraction)

left to right

<<, >>, >>>

left to right

<, <=, >, >=

left to right

= =, ! =

left to right

&

left to right

^

left to right

|

left to right

&&

left to right

||

left to right

?:

right to left

==, /=, %=, <<=, >>=, >>>=, &=, ^=, |=, +=, -=, *=

right to left

,

left to right

本文由 猫斯基 原创发布。

著作权均归用户本人所有。独家文章转载,请联系本站管理员。获得授权后,须注明本文地址! 本文地址:https://www.maosiji.com/3044.html

关注我们

站长

WordPress迷