Javascript getting started

Source: Internet
Author: User

The title is a little big. In fact, I only recommend some learning methods and getting started skills for a friend who wants to learn JavaScript.

Javascript is a simple and easy-to-learn language with a very low threshold. I think it is very suitable to start with JavaScript. As long as there is a text editor, you can write a hello World Program within 30 s.

The following is a Learning Outline. Generally, no matter whether you have any programming experience, you can get started after you finish learning the outline (in fact, the basic learning content of any programming language is similar ):

  1. Data Type:
    The javascript data type is relatively simple. I think it is enough to know that there are numbers, strings, Boolean, array, date, and null, when you increase the number of data types, you can easily find the data types in this Manual. The key is to understand the data types in practical applications.
  2. Expressions and operators:
    Simply put, a statement in the form of a = B + C is called an expression, where = and + are operators. In the getting-started stage, the "addition, subtraction, multiplication, division, and not" plus ++, --, = ,! = That's enough. This part of content is not much. I suggest you read it through this manual.
  3. Statement:
    This part is a little more complex than the previous two parts, but more experiments, more contact with the natural understanding, nothing more than judgment, loop, definition of variables, functions a class, writing any program is inseparable from these things, because it is too basic.
  4. Define/call a function:
    A complete project is like a car. As mentioned above, it is like a car's parts. To turn parts into a car, an intermediate process is also required to assemble the parts into an engine first, A system that can run independently. Each system can contain smaller systems. This is a function.
    In simple terms, a function is a function block, which defines the function block and is then assembled into the project for application. Some function blocks are like engines and used only once, and some function blocks are like wheels, it will be used multiple times.
  5. Array Operations:
    Arrays are amazing and must be mastered. First, understand the concept of arrays and try to operate an array, it is best to experiment with every method of the array (there are few methods in total). We recommend that you read the relevant chapters of the manual.
  6. String operations:
    A string is a basic data type of JavaScript. It should be the most commonly used data type during development. Strings can be considered as arrays (but not completely) in JavaScript ), in addition, there are many methods for strings. We recommend that you read them through and experiment each one to understand their functions.
  7. Dom operation:
    In addition to processing logic, JavaScript serves HTML in the end, so Dom operations are essential. In the Getting Started stage, you can simply master some basic operations (you can modify the DOM dynamically ).
  8. Event:
    The most amazing thing about Javascript is event-driven. With the event, everything is ready. after learning the event, your journey to getting started is almost over. Congratulations.
We recommend that you complete several experiments after getting started:
  1. Display current time:
    Obtain the time of each part (year, month, day, hour, minute, second, millisecond). If the time is a single digit, the first part must be zero. If possible, you 'd better make a clock.
    Knowledge Point: String, date object, simple Dom operation, timer (not mentioned in the outline, about setTimeout and setinterval in the query manual)
  2. Form data verification:
    Verify whether the data in a specific text box is valid, such as type check (whether it is an integer or decimal number), length check, format check (ID card number, mobile phone number, date, specific format)
    Knowledge points: Form operations, simple Dom operations, understanding data types, event applications, string learning (Extensible array learning ).
  3. Simulate single-choice and multiple-choice components:
    Use any HTML tag as an item to write a list structure (UL> Li is the most suitable). Click "item" to select or deselect the selected state. You must implement both single-choice and multiple-choice options, the selected result is displayed.
    Knowledge Point: complex Dom operations, combination of styles, array applications, and event applications.
  4. Test your keyboard:
    Bind a keyboard event and test the key value corresponding to each key. use ctrl and shift to work on the keyboard.
    Knowledge Point: Keyboard Events, other things (to what extent do you watch tricks)
Appendix:
  1. How to get started with javascript:Http://www.codecademy.com/
    You can use this website to learn JavaScript online (write code online and get results), learn from the basics, Step by Step Guide deep, very good.
  2. One lab:Http://jsfiddle.net/
    It is also an online tool. It is very convenient to experiment here during the course of learning other materials. Besides native JS, it also supports many common JS frameworks.
  3. A framework:Http://jquery.com/
    Jquery is a JS framework. The so-called framework is a set of tool libraries encapsulated with native Js. With the framework, when you assemble your car, you won't have to use a hard-to-use wrench or cone, or even use magic.
  4. An Editor:Http://notepad-plus-plus.org/
    The famous free open-source editor is not to mention that the process of exploration is full of surprises like learning programming.
  5. An online manual:Http://www.w3school.com.cn/js/index.asp
    W3cschool and other related tutorials are worth your reference.
Last:The best way to master a language is to do more. Put an editor and a manual on the desktop. If you encounter any problems in the manual, there is nothing wrong with the manual. Also, learning is a long-term task, sometimes it may be painful, but it is incomparable to the pleasure after the pain and tangle. Come on ~~~

Related Article

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.