1. Trang chủ
  2. » Giáo án - Bài giảng

no starch press eloquent javascript, a modern introduction to programming

210 380 0

Đang tải... (xem toàn văn)

Tài liệu hạn chế xem trước, để xem đầy đủ mời bạn chọn Tải xuống

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 210
Dung lượng 1,78 MB

Nội dung

[...]... JavaScript provides a thing called a variable var caught = 5 * 5; A variable always has a name, and it can point at a value, holding on to it The previous statement creates a variable called caught and uses it to grab hold of the number that is produced by multiplying 5 by 5 After a variable has been defined, its name can be used as an expression that produces the value it holds Here’s an example: var... var is used to create a new variable After var, the name of the variable follows Variable names can be almost every word, but they may not include spaces Digits can also be part of variable names—catch22 is a valid name, for example—but the name must not start with a digit The characters $ and _ can be used in names as if they were letters So, for example, $_$ is a correct variable name Basic JavaScript:... similar operators are >= (“is greater than or equal to ), . 'compare' If 'compare' is zero, continue at [end] Add 'count' to 'total' Add 1 to 'count' Continue at [loop] [end] Output 'total' At. language. Contrary to what the name suggests, JavaScript has very little to do with the programming language named Java. The similar name was inspired by marketing considerations, rather than. to something straightforward and predictable and to place a taboo on all the weird and beautiful programs! The landscape of programming techniques is enormous, fascinating in its diversity, and

Ngày đăng: 28/04/2014, 16:57

TỪ KHÓA LIÊN QUAN