TAILIEUCHUNG - Operators

Các nước sử dụng là các nhãn hiệu trong một biểu thức kiểm soát cách thức mà các giá trị của biểu thức được đánh giá. Các nhà điều hành bạn sử dụng sẽ phụ thuộc vào cách thức mà bạn cần để thao tác các giá trị. | Operators Operators are the marks within an expression that control the way in which the expression s values are evaluated. The operators you use will depend on the ways in which you need to manipulate values. NOTE In this section we review both arithmetic and string operators. For information about logical and comparison operators see Lesson 8 Using Conditional Logic. Arithmetic Operators Even if you re not very familiar with ActionScript you ll recognize most of the arithmetic operators. These operators are used in expressions to manipulate numeric values. Addition operator . Adds two numeric values together. For example var totalCost Number productPrice tax adds the two variables to arrive at a final result. Increment operator . A shorthand method for adding 1 to a value. For example myAge increases the value of the myAge variable by 1 the equivalent of myAge myAge 1 Subtraction operator - . This operator subtracts two values and can be used in the same way as the addition operator. For example var moneylnWallet paycheck -moneySpent subtracts one value from another to return a new number. Decrement operator -- . This operator reduces the value of a variable by 1. For example --bottlesOfBeerOnTheWall takes a bottle of beer from the wall. Multiplication operator . This operator multiplies one numeric value by another. For example in var hoursPerWeek Number 24 7 the number of hours per week is the product of these two numbers being multiplied together. Division operator . Divides one numeric value by another. For example var hourlyRate Number payCheck hoursBilled divides the value of hoursBilled into the value of payCheck. Modulo operator . Divides the value on the left by the value on the right and returns the value of the remainder. For example in 4 2 the result would be 0 because 4 can be evenly divided by 2 hence there is no remainder. In 7 3 the result is 1 because 3 divides into 7 twice with a remainder of 1. Here s an illustration of how it works String .

TAILIEUCHUNG - Chia sẻ tài liệu không giới hạn
Địa chỉ : 444 Hoang Hoa Tham, Hanoi, Viet Nam
Website : tailieuchung.com
Email : tailieuchung20@gmail.com
Tailieuchung.com là thư viện tài liệu trực tuyến, nơi chia sẽ trao đổi hàng triệu tài liệu như luận văn đồ án, sách, giáo trình, đề thi.
Chúng tôi không chịu trách nhiệm liên quan đến các vấn đề bản quyền nội dung tài liệu được thành viên tự nguyện đăng tải lên, nếu phát hiện thấy tài liệu xấu hoặc tài liệu có bản quyền xin hãy email cho chúng tôi.
Đã 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.