Java programmer's JavaScript learning notes (1-concept) and javascript learning notes

Source: Internet
Author: User

Java programmer's JavaScript learning notes (1-concept) and javascript learning notes


We plan to complete this note in the following order:

Each article may have a few words or a long story. Short may be because the concepts are hard to understand and need to be digested slowly. Long may be because there is too much content and water, but it cannot be avoided.

Now I will start with article 1st: concepts.

Equality of all beings

JavaScript is a weak type of language. On the surface, it means that the variable type is not checked at the syntax level. The deep meaning is:In the JavaScript world, all beings are equal.

Not only variables, but also arrays, functions, and objects. I am used to C ++, Java, and C # Kids shoes, but I cannot accept them?

Yes, all beings are equal. Let's look at the example below.

<script><strong>var arr = [function(){ return this.x*this.y;},56,{x:10,y:16} ];</strong></script>

In the array arr, the first element (arr [0]) is a function, the second element (arr [1]) is a number, and the third element (arr [2]) is an object.

A little unaccustomed? It indicates that you have not adapted to the concept of JavaScript.

Let's look at the following statement:

<Script> var arr = [function () {return this. x * this. y ;}, 56, {x: 10, y: 16}]; // It doesn't matter if you don't understand this. Leave it alone first. I will talk about <strong> arr [2] Later. area = arr [0]; alert (arr [2]. area (); </strong> </script>

Okay, this is the end of article 1st.

Looking at the code above, there is no sense of violation. It feels like a vernacular, and the purpose of this article is achieved.

The concept is not uniform, so you cannot go back, read others' code, and write authentic JavaScript code.

If the above Code is still not used to reading, look for a few books, look for some code to see, and gradually get used to it.

 

 

Digress:


Those who are used to habits in an authority society are used to the strict distinction between emperors, princes, officials, citizens, and slaves. When youbang saw the mayor and the caolimin queuing up to buy a hamburger, he was shocked.

There is no such thing as it is not necessary, and it is no different to get used to it.

 

 

 




What level should java programmers master in javascript?

In fact, there are source code available on the net, and the js frameworks they use, such as jquery and ajax frameworks, such as dojo, extjs, and dwr, As long as programmers can write common javascript, such as form verification, tree menu, shutter menu, etc. And must be familiar with common methods of commonly used objects, such as document, widow, form. I am developing at the company and spend more time on the front end than on the back end. Programmers also need to understand css,

Java programmers learn JavaScript

1. You do not need to develop GUI graphics!
2. If you only perform background development, you do not need
3. If you develop a front-end page

OVER

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.