JavaScript Lesson 1: Variable Variables

Source: Internet
Author: User

Lesson 1 Variables

Article Title: Learn JavaScript: Lesson 1: JavaScript Variables
By Stephen Chapman
Translator: Hao Xiaoru http://www.haoxiaoru.info/

(This article is long and smelly, but it is extremely easy to understand. It is only suitable for beginners of JavaScript, especially those with no foundation)

1.1 Introduction
To learn how JavaScript works, first understand the general working principles of programming languages. Once you have learned this basic knowledge, you can write interesting JavaScript code so that users can interact with your webpage in a variety of ways, to enhance their experience when accessing your website. For example, extract one or more values input by the user in the form, use these values to execute the operation, and then update the Page Based on the operation results. This is probably the simplest interaction. You can also use the computing results to generate more advanced interactive behaviors: Moving Elements on the page, changing the appearance of the page, and dynamically updating the page content with new information.

The core of any language is grammar, regardless of the language in life or computer programming language. Syntax provides a set of rules that we must follow when using this language. Compared with the randomness of the language of life and the many special syntax cases, the computer language is much more rigorous and must follow these rules to write programs. No one in a computer is smart. You must precisely tell it what to do next. When you write less or write wrong instructions, maybe people can still understand what you mean, and computers won't. Only by understanding the grammar rules that computers use to explain your instructions can you Correctly Instruct the computer to do what you want it to do.

Any language includes two basic parts of speech. Nouns and verbs are the basic parts of speech of life language. Variables and operators are the "basic part of speech" of many computer programming languages, including JavaScript ".

The first article will explore several core concepts about variables and operators. For example:

In JavaScript, how can we define variables and variable types that can be defined.
How to Use operators to process numbers and strings
What if different types of variables are mixed?

  • Three pages in total:
  • Previous Page
  • 1
  • 2
  • 3
  • Next Page

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.