Upcoming SlideShare
×

# サイ本 文

600 views

Published on

サイ本勉強会スライド

0 Likes
Statistics
Notes
• Full Name
Comment goes here.

Are you sure you want to Yes No
• Be the first to comment

• Be the first to like this

Views
Total views
600
On SlideShare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
0
0
Likes
0
Embeds 0
No embeds

No notes for slide
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• \n
• ### サイ本 文

1. 1. 6
2. 2. varvar name_1 [ = value_1 ] [ , ..., name_n [ = value_n ]] → Call →
3. 3. functionfunction funcname ([arg1 [, arg2 [..., argn]]]) { statement}
4. 4. •••
5. 5. function hoge() { huga(); function huga() { console.log("piyopiyo"); }}hoge(); // “piyopiyo”
6. 6. returnreturn expression;
7. 7. throwthrow expression;
8. 8. Q. JavaScriptA.
9. 9. Errorfunction hoge() { try { throw "hogehogehgoe"; } catch(e) { console.log(e); }}hoge(); // “hogehogehoge”
10. 10. 1.2. catch3.
11. 11. try/catch/ﬁnaly ● ●
12. 12. try { throw new Error(" "); //}catch(e) { // try console.log(e) // " "}ﬁnaly { // try // try //}
13. 13. ﬁnally•• break , continue , return• catch•
14. 14. function testﬁnally(a) { try { throw new Error(" "); } ﬁnally { console.log(a); }}testﬁnally("hogehogehogehoge");
15. 15. [takashi ~ 09:55 AM] \$ node statement2.jshogehogehogehoge //node.js:63 throw e; ^Error: //
16. 16. function testﬁnally(a) { try { throw new Error(" "); } catch(e) { throw new Error(" "); } ﬁnally { console.log(a); throw new Error(" "); }}testﬁnally("hogehogehogehoge");
17. 17. [takashi ~ 10:01 AM] \$ node statement2.jshogehogehogehogenode.js:63 throw e; ^Error:
18. 18. withwith (object) statement
19. 19. with by dankogaihttp://blog.livedoor.jp/dankogai/archives/51066288.html
20. 20. var foo = { bar : 1 }; var bar = 2; console.log(bar); with(foo){ console.log(bar); delete foo[bar]; console.log(bar); }[takashi ~ 10:10 AM] \$ node dankogai1.js2 // bar1 // foo bar2 // bar
21. 21. • with(object) object • object.name name” with() withoutwith() with(Math) with(new Namespace()) ”