Last active
December 28, 2015 16:59
-
-
Save Kuniwak/7532453 to your computer and use it in GitHub Desktop.
JavaScriptの優先順位のチートシート。CodeGolf用。
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// | 優先順位 | 演算子の種類 | 結合性 | 各演算子 | | |
// |:--------:|:----------------:|:--------:|:----------:| | |
// | 1 | メンバ | 左から右 | . | | |
// | | | | [] | | |
// | | new | 右から左 | new | | |
// | 2 | 関数呼び出し | 左から右 | () | | |
// | 3 | インクリメント | n/a | ++ | | |
// | | デクリメント | n/a | -- | | |
// | 4 | 論理 NOT | 右から左 | ! | | |
// | | ビットごとの NOT | 右から左 | ~ | | |
// | | 単項の + | 右から左 | + | | |
// | | 符号反転 | 右から左 | - | | |
// | | typeof | 右から左 | typeof | | |
// | | void | 右から左 | void | | |
// | | delete | 右から左 | delete | | |
// | 5 | 乗算 | 左から右 | * | | |
// | | 除算 | 左から右 | / | | |
// | | モジュロ(剰余) | 左から右 | % | | |
// | 6 | 加算 | 左から右 | + | | |
// | | 減算 | 左から右 | - | | |
// | 7 | ビットシフト | 左から右 | << | | |
// | | | | >> | | |
// | | | | >>> | | |
// | 8 | 大小関係 | 左から右 | < | | |
// | | | | <= | | |
// | | | | > | | |
// | | | | >= | | |
// | | in | 左から右 | in | | |
// | | instanceof | 左から右 | instanceof | | |
// | 9 | 同値関係 | 左から右 | == | | |
// | | | | != | | |
// | | | | === | | |
// | | | | !== | | |
// | 10 | ビットごとの AND | 左から右 | & | | |
// | 11 | ビットごとの XOR | 左から右 | ^ | | |
// | 12 | ビットごとの OR | 左から右 | | | | |
// | 13 | 論理 AND | 左から右 | && | | |
// | 14 | 論理 OR | 左から右 | || | | |
// | 15 | 条件 | 右から左 | ?: | | |
// | 16 | yield | 右から左 | yield | | |
// | 17 | 代入 | 右から左 | = | | |
// | | | | += | | |
// | | | | -= | | |
// | | | | *= | | |
// | | | | /= | | |
// | | | | %= | | |
// | | | | <<= | | |
// | | | | >>= | | |
// | | | | >>>= | | |
// | | | | &= | | |
// | | | | ^= | | |
// | | | | |= | | |
// | 18 | カンマ | 左から右 | , | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment