谈谈Javascript设计
Upcoming SlideShare
Loading in...5
×
 

谈谈Javascript设计

on

  • 6,191 views

 

Statistics

Views

Total Views
6,191
Views on SlideShare
906
Embed Views
5,285

Actions

Likes
4
Downloads
39
Comments
1

3 Embeds 5,285

http://ued.alipay.com 5278
http://xianguo.com 5
http://zhuaxia.com 2

Accessibility

Categories

Upload Details

Uploaded via as Apple Keynote

Usage Rights

© All Rights Reserved

Report content

Flagged as inappropriate Flag as inappropriate
Flag as inappropriate

Select your reason for flagging this presentation as inappropriate.

Cancel

11 of 1

  • Full Name Full Name Comment goes here.
    Are you sure you want to
    Your message goes here
    Processing…
  • cool
    Are you sure you want to
    Your message goes here
    Processing…
Post Comment
Edit your comment
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n
  • \n

谈谈Javascript设计 谈谈Javascript设计 Presentation Transcript

  • JavaScript
  • XD
  • ; , . [] {}
  • - -_-b-var _ = -1, b = -1;return -_-b;
  • -var a, b, c;a = b = 1;var node;if(node = D.get(‘myId’)) { // ...
  • -if(a != b) -> if(a - b)if(a == b) -> if(!(a - b))== & ===,
  • -, . [] {};,{}
  • -, . [] {}.[]
  • -newindeletetypeofinstanceof typeof & instanceof?
  • -var
  • -if...else ifif continue/break?switch...case
  • - gotofor while/do...while?do...while(0)?
  • - debuggerreturnthrowtry...catch(e)
  • -Functionjscex:
  • NaN: parseundefined: null NaN & undefined?
  • (Scalar)(Object)
  • -
  • -
  • call & applyarguments
  • -call & applyvar log = function() { window.console && console.log.apply(console, arguments);};var w = document.write;w.call(document, ‘some message’);
  • -argumentsIt’s automaticvar init = function() { return function() { if(arguments.callee.invoked) return; arguments.callee.invoked = true; // ...
  • janlay@gmail.com @janlay