亚洲国产日韩欧美一区二区三区,精品亚洲国产成人av在线,国产99视频精品免视看7,99国产精品久久久久久久成人热,欧美日韩亚洲国产综合乱

JavaScript special operators and operator precedence

Special operators

  • new operator: Create an object. For example: var today = new Date(); //Create a current system date and time object

  • delete operator: delete elements of the array or attributes of the object.

  • typeof operator: unary operator, main function: determine the type of variable. For example: typeof name or typeof(name)

  • Dot operator (.): Mainly used in objects, using dot operator (.) to call properties or methods. For example: window.alert(“OK”)

  • [ ] Square brackets: mainly used to access array elements. For example: arr[0] = 100; //Find the array element with subscript 0 and reassign it


Operator precedence

1.png

##Note: In actual use, if you can’t tell the priority Level, just use the knowledge we learned in elementary school. If you want to calculate which one should be calculated first, just add parentheses to wrap it up. It is simple and crude, and the effect is good


Continuing Learning
||
<!DOCTYPE HTML> <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"> <title>php.cn</title> <script type="text/javascript"> //在當前窗口彈出以一個對話框 document.write("歡迎大家學(xué)習我們的JavaScript課程,一分耕耘一分收獲,希望大家多多練習代碼"); </script> </head> <body> </body> </html>
submitReset Code