tailieunhanh - Javascript bible_ Chapter 10

Tham khảo sách 'javascript bible_ chapter 10', 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ả | Strings Math and Dates For most of the lessons in the tutorial so far the objects at the center of attention were objects belonging to the document object model. But as indicated in Chapter 2 a clear dividing line exists between the document object model and the JavaScript language. The language has some of its own objects that are independent of the document object model. These objects are defined such that if a vendor wished to implement JavaScript as the programming language for an entirely different kind of product the language would still use these core facilities for handling text advanced math beyond simple arithmetic and dates. Core Language Objects It is often difficult for newcomers to programming or even experienced programmers who have not worked in object-oriented worlds before to think about objects especially when attributed to things that don t seem to have a physical presence. For example it doesn t require lengthy study to grasp the notion of a button on a page being an object. It has several physical properties that make perfect sense. But what about a string of characters As you learn in this chapter in an object-based environment such as JavaScript everything that moves is treated as an object each piece of data from a Boolean value to a date. Each such object probably has one or more properties that help define the content such an object may also have methods associated with it to define what the object can do or what can be done to the object. I call all objects not part of the document object model global objects. You can see the full complement of them in the JavaScript Object Road Map in Appendix A. In this lesson the focus is on the String Math and Date objects. String Objects You have already used string objects many times in earlier lessons. A string is any text inside a quote pair. A quote pair In This Chapter How to modify strings with common string methods When and how to use the Math object How to use the Date object 2 Part II .

TỪ KHÓA LIÊN QUAN