Javascript bible_ Chapter 7

Tham khảo sách 'javascript bible_ chapter 7', 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ả | Programming Fundamentals Part II our tour of programming fundamentals continues in this chapter with subjects that have more intriguing possibilities. For example I show you how programs make decisions and learn why a program must sometimes repeat statements over and over. Before you re finished here you will learn how to use one of the most powerful information holders in the JavaScript language the array. Decisions and Loops Every waking hour of every day you make decisions of some kind most of the time you probably don t even realize it. Don t think so Well look at the number of decisions you make at the grocery store from the moment you enter the store to the moment you clear the checkout aisle. No sooner do you enter the store than you are faced with a decision Based on the number and size of items you intend to buy do you pick up a hand-carried basket or attempt to extricate a shopping cart from the metallic conga line near the front of the store That key decision may have impact later when you see a special offer on an item that is too heavy to put into the hand basket. Now you head for the food aisles. Before entering an aisle you compare the range of goods stocked in that aisle against items on your shopping list. If an item you need is likely to be found in this aisle you turn into the aisle and start looking for the item otherwise you skip the aisle and move to the head of the next aisle. Later you reach the produce section in search of a juicy tomato. Standing in front of the bin of tomatoes you begin inspecting them one by one picking one up feeling its firmness checking the color looking for blemishes or signs of pests. You discard one pick up another and continue this process until one matches the criteria you have set in your mind for an acceptable morsel. Your last stop in the store is the checkout aisle. Paper or plastic the clerk asks. One In This Chapter How control structures make decisions How to define functions Where to initialize variables

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.