javascript programmer's reference phần 7

Nếu có bất kỳ Nhược điểm này là mỗi cặp cân bằng của niềng răng sẽ tạo ra một bối cảnh thực hiện mới. Điều này có thể làm chậm hiệu suất, nhưng mặt khác nó có thể cho phép các biến địa phương scoped được tạo ra và bị phá hủy ở mức độ chi tiết hơn so với một cơ quan chức năng. Ngoài ra còn có phạm vi | O - Object Definition This is good because it thinks ahead to the possibility of maintenance and tends towards fewer editing errors if aCondition someCode while aCondition someCode for . someCode If there is any downside to this it is that every balanced pair of braces will create a new execution context. This may slow performance but on the other hand it can allow locally scoped variables to be created and destroyed at a level that is more granular than a function body. There is also scope for a religious debate on indentation. Three space characters works great for me . I don t like tabs because if you move the source code to another editor the indentation can go awry. Space characters for indentation ensure that the source code looks the same in any monospaced editing window and probably looks OK in a word processor too. See also Flow control if . . while . . Object Definition There is a distinct difference between an object and an Object. We refer to the built-in Object class with a capitalised name. When referring generically to objects of other classes the word object is all lower case. Therefore we can have an Object object and a String object. Native objects are built-in host objects are also built in but created outside of the JavaScript core functionality. User-defined objects are not covered here. 1569 JavaScript Programmer s Reference Here is a list of object classes with a note about what sort of object they are and when how they are managed Class Category Description Array Native A collection of objects in a sequence Boolean Native A logical value container Date Native A date value container Function Native A function code container Global Built-in A container for global properties methods and functions Image Hosted Web browser image wrapper Math Built-in A container for math functions Number Native A numeric value Object Native A generic object String Native A sequence of characters Because you might refer to documents in many ways possibly by means

Bấm vào đây để xem trước nội dung
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
38    73    2    30-04-2024
Đã phát hiện trình chặn quảng cáo AdBlock
Trang web này phụ thuộc vào doanh thu từ số lần hiển thị quảng cáo để tồn tại. Vui lòng tắt trình chặn quảng cáo của bạn hoặc tạm dừng tính năng chặn quảng cáo cho trang web này.