JavaScript from JQuery

Source: Internet
Author: User

  1. http://learn.jquery.com/javascript-101/Types/
    1. Primitives
      1. String: "", "", \
      2. Number:integer and floating point
      3. Boolean: true orfalse
      4. Null:null
      5. undefined:undefined
    2. objects
      1. object:object literal {:,:},unordered key and Value Pairs,key is formally known as a  prop Erty  and The value can be any valid JavaScript type, even another object. To the Create or access a property in an object, we use the what is known as "dot notation" or "bracket notation."
      2. array:ordered by the index of each item it contains. The index starts at zero and extends to however many items has been added, which is a property of the array known as the& nbsp . Length . Similar to a basic object, an array can is created with the  array  constructor or the shorthand Synt Ax known as array literal [].
      3. Function
    3. Type Checking with JQuery
      1. ===
      2. typeof
      3. jQuery.isFunction( myValue ); // falsejQuery.isPlainObject( myValue ); // falsejQuery.isArray( myValue ); // true
  2. http://learn.jquery.com/javascript-101/Operators/
    1. Operations on Numbers & Strings
    2. Logical Operators
    3. Comparison Operators
  3. Http://learn.jquery.com/javascript-101/conditional-code/
    1. falsy things: //Values that evaluate to false: false //an empty string. nan //JavaScript ' s "not-a-number" variable. null undefined //be careful--undefined can redefined! 0 //the number zero.
    2. Truthy: // Everything else evaluates to true, some examples:"0""any string"[] // An empty array.{} // An empty object.1 // Any non-zero number.
    3. Conditional Variable assignment with the ternary Operator
    4. Switch statements
  4. http://learn.jquery.com/javascript-101/Loops/
    1. for ( [initialization]; [conditional]; [iteration] ) { [loopBody]}
    2. while ( [conditional] ) { [loopBody]}
    3. do { [loopBody]} while ( [conditional] )
    4. Breaking and continuing
  5. http://learn.jquery.com/javascript-101/reserved-words/
    1. Break case Catch Class const continue debugger default Delete does else enum export extends false finally for function if IM Plements Import in instanceof interface let new NULL package private protected public return static Super switch this thro W true try typeof var void while with yield
  6. http://learn.jquery.com/javascript-101/Arrays/
    1. Arrays is zero-indexed (indexed starting from 0), ordered lists (preserves the original stacking order) of values.
    2. . Sort (): After sorting the original array has been changed, sorts an array. It takes one parameter, which is a comparing function. If This function is not a given, the array is sorted ascending. The return value of descending (for this example) is important. If the return value is less than zero, the index a b of was before, and if it is greater than zero it ' s vice-versa. If The return value is zero, the elements ' index is equal.
    3. . ForEach (): The function takes up to three arguments:
      1. element–the element itself.
      2. Index–the index of this element in the array.
      3. Array–the array itself. All of these is optional
    4. . Unshift (): Inserts an element at the first position of the array
    5. . Shift () removes the first element of an array.
    6. Splice (): Partial element substitution, removes a certain amount of elements and adds new ones at the given index. It takes at least three parameters:1 myarray.splice (index, length, values, ...); Index–the starting index. Length–the number of elements to remove. Values–the values to is inserted at the index position.
    7. . Slice (): Extracts from index start to the last part, Extracts a parts of the array and returns that a new array. This method takes one parameter, which is the starting index:
    8. Reverse (): The original array has been changed after reverse, the elements of the array is in reverse order after calling this method
    9. . Push (): Is a function This adds an element on the end of the array and expands the array respectively.
    10. . Pop (): Removes the last element of an array. It is the opposite method of. Push ()
    11. .join()Creates a string representation of an array by joining all of its elements using a separator string
    12. Concatenate-arrays with. Concat ():
    13. .lengthProperty was used to determine the amount of items in an array
  7. HTTP://LEARN.JQUERY.COM/JAVASCRIPT-101/Objects/
    1. Objects contain one or more key-value pairs. The key portion can is any string. The value portion can is any type of value:a number, a string, an array, a function, or even another object. When one of these values is a function, it's called a method of the object. Otherwise, they is called properties.
  8. http://learn.jquery.com/javascript-101/functions/
      1. //Function declaration. function foo () { //do something. }
      2. //Named function expression. var foo = function () { //do something. };
      3. //A simple function.
      4. //A function that returns A value.
      5. //A function that returns another function.
      6. immediately-invoked Function Expression (iife): (function () { span class= "keyword" >var foo = }) ();
      7. Functions as Arguments
  9. http://learn.jquery.com/javascript-101/Testing-type/
    1. var myregexp = /(\w+) \s (\w+)/;
    2. if ( Object.prototype.toString.call( myArray ) === "[object Array]" ) { // Definitely an array! // This is widely considered as the most robust way // to determine if a specific value is an Array.}
  10. http://learn.jquery.com/javascript-101/ This-keyword/
    1. thisis a special keyword that's used in methods to refer to the object on which a method is being invoked
      • If The function is invoked using Function.call() or Function.apply() , 'll be set to the first this argument passed to .call() / .apply() . If The first argument passed .call() to/ .apply() null is or undefined , would refer to the this Global object (which window is the object in Web browsers).
      • If The function being invoked was created using Function.bind() , would be is the first argument that is passed to at the this .bind() Time the function was created.
      • If The function is being invoked as a method of a object, would refer to that this object.
      • Otherwise, the function is being invoked as a standalone function not attached to any object, and would refer to the this Global object.
  11. HTTP://LEARN.JQUERY.COM/JAVASCRIPT-101/Scope/
    1. In a browser, the global scope is the window object
  12. http://learn.jquery.com/javascript-101/Closures/
    1. Closures is an extension of the concept of scope
  13. 1
  14. 1
  15. 1
  16. 1
  17. 1
  18. 1

JavaScript from JQuery

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.