国产av日韩一区二区三区精品,成人性爱视频在线观看,国产,欧美,日韩,一区,www.成色av久久成人,2222eeee成人天堂

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"> //在當(dāng)前窗口彈出以一個(gè)對(duì)話框 document.write("歡迎大家學(xué)習(xí)我們的JavaScript課程,一分耕耘一分收獲,希望大家多多練習(xí)代碼"); </script> </head> <body> </body> </html>
submitReset Code