Javascript bible_ Chapter 27

Tham khảo sách 'javascript bible_ chapter 27', công nghệ thông tin, kỹ thuật lập trình phục vụ nhu cầu học tập, nghiên cứu và làm việc hiệu quả | Math Number and Boolean Objects The introduction to data types and values in Chapter 6 s tutorial scratched the surface of JavaScript s numeric and Boolean powers. In this chapter you look more closely at JavaScript s way of working with numbers and Boolean data. Math often frightens away budding programmers but as you ve probably seen so far in this book you don t really have to be a math genius to program in JavaScript. The powers described in this chapter are here when you need them if you need them. So if math was not your strong suit in school don t freak out over the terminology here. An important point to remember about the objects described in this chapter is that like string values and string objects numbers and Booleans are both values and objects. Fortunately for script writers the differentiation is rarely if ever a factor unless you get into some very sophisticated programming. To those who actually write the JavaScript interpreters inside the browsers we use the distinctions are vital. As the language evolves its behavior is increasingly formalized to a point at which the core language attributes of which strings and numbers are a part have been documented and published as an industry standard ECMA-262 . That standard serves as a guideline for all organizations that build JavaScript interpreters into their products. These folks in turn make the scripter s life easier by generally allowing us to treat a number or Boolean as a value or object as we please. For most scripters the information about numeric data types and conversions as well as the Math object are important to know. Other details in this chapter about the number and Boolean objects are presented primarily for completeness since their direct powers are almost never used in day-to-day scripting of Web applications. In This Chapter Advanced math operations Number base conversions Working with integers and floatingpoint numbers 568 Part III JavaScript Object and Language Reference Numbers in .

Không thể tạo bản xem trước, hãy bấm tải xuống
TỪ KHÓA LIÊN QUAN
TÀI LIỆU MỚI ĐĂNG
Đã 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.