Javascript [Electronic resources] : The Definitive Guide (4th Edition) نسخه متنی

اینجــــا یک کتابخانه دیجیتالی است

با بیش از 100000 منبع الکترونیکی رایگان به زبان فارسی ، عربی و انگلیسی

Javascript [Electronic resources] : The Definitive Guide (4th Edition) - نسخه متنی

David Flanagan

| نمايش فراداده ، افزودن یک نقد و بررسی
افزودن به کتابخانه شخصی
ارسال به دوستان
جستجو در متن کتاب
بیشتر
تنظیمات قلم

فونت

اندازه قلم

+ - پیش فرض

حالت نمایش

روز نیمروز شب
جستجو در لغت نامه
بیشتر
لیست موضوعات
توضیحات
افزودن یادداشت جدید







Chapter 4. Variables


A

variable is a name associated with a value; we
say that the variable stores or contains the value. Variables allow
you to store and manipulate data in your programs. For example, the
following line of JavaScript assigns the value 2
to a variable named i:

i = 2;

And the following line adds 3 to
i and assigns the result to a new variable,
sum:

var sum = i + 3;

These two lines of code demonstrate just about everything you need to
know about variables. However, to fully understand how variables work
in JavaScript, you need to master a few more concepts. Unfortunately,
these concepts require more than a couple of lines of code to
explain! The rest of this chapter explains the typing, declaration,
scope, contents, and resolution of variables. It also explores
garbage collection and the variable/property duality.[1]

Chapter 5, Chapter 6, and Chapter 7 before returning to finish up the
remainder of this chapter.



    / 844