$30 off During Our Annual Pro Sale. View Details »
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Java エンジニアのためのJavaScript講座
Search
Takeshi Kawajiri
April 24, 2013
Technology
4
1.2k
Java エンジニアのためのJavaScript講座
JJUG Night Seminar.
http://kokucheese.com/event/index/85227/
Takeshi Kawajiri
April 24, 2013
Tweet
Share
Other Decks in Technology
See All in Technology
つくってあそぼ! ユビキタス言語作文の紹介
ndadayo
1
130
.NET のUnified AI Building Blocks 入門...!
okazuki
0
180
241130紅白ぺぱ合戦LT「編集の技術」
toya524287
5
620
WED Company Deck for Engineer
wed
2
3.7k
Kubernetesを知る
logica0419
17
4.7k
12/3(火)のBedrockアプデ速報(re:Invent 2024 Daily re:Cap #2 with AWS Heroes)
minorun365
PRO
4
130
How is Cilium Tested?
yutarohayakawa
5
280
2024/11/29_失敗談から学ぶ! エンジニア向けre:Invent攻略アンチパターン集
hiashisan
0
430
【ASW21-01】STAMPSTPAで導き出した課題に対する対策立案手法の提案
hianraku9498
0
540
ゆるSRE勉強会 #8 組織的にSREが始まる中で意識したこと
abnoumaru
2
1k
12/2(月)のBedrockアプデ速報(re:Invent 2024 Daily re:Cap #1 with AWS Heroes)
minorun365
PRO
2
300
AWS re:Invent 2024登壇資料(GBL206-JA: Unleashing the power of generative AI on AWS for your business)
minorun365
PRO
5
200
Featured
See All Featured
Fashionably flexible responsive web design (full day workshop)
malarkey
405
65k
The Art of Programming - Codeland 2020
erikaheidi
53
13k
Git: the NoSQL Database
bkeepers
PRO
427
64k
Practical Tips for Bootstrapping Information Extraction Pipelines
honnibal
PRO
10
770
Reflections from 52 weeks, 52 projects
jeffersonlam
346
20k
Designing for humans not robots
tammielis
250
25k
Why You Should Never Use an ORM
jnunemaker
PRO
54
9.1k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
232
17k
"I'm Feeling Lucky" - Building Great Search Experiences for Today's Users (#IAC19)
danielanewman
226
22k
Thoughts on Productivity
jonyablonski
67
4.3k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
665
120k
jQuery: Nuts, Bolts and Bling
dougneiner
61
7.5k
Transcript
݄ !L[SJ ++6(φΠτɾηϛφʔ ʮ+BWBΤϯδχΞͷͨΊͷ+BWB4DSJQUߨ࠲ʯ ໊ࢺԦࠃͱͭͷଜͷ
৲߶ 4*
/&8
"MMZPVSCBTFBSFCFMPOHUPVT
ετΞΞϓϦ
None
None
None
+BWB4DSJQU ։ൃऀͷڞ௨ݴޠ
ΩʔϝοηʔδΛதԝʹදࣔ ϑΥϯτ ώϥΪϊ֯ΰ4UE/QU +BWB4DSJQUͷॻ੶ʹৄ͍͠ େઌੜ ૉࡐ ࠓ
None
+BWBͷ ઓ࢜ 1SPHSBNNFS ຐ๏͍ )BDLFS ૐཿ 2"
ಈࢺଜ ໊ࢺଜ ϥϜμଜ
Ճ(ᣀ, 105); ͢_ϖΫνϯ(ᣀ); ࠞͥΔ(ϨϞϯ, ᣀ); ಈࢺଜ
໊ࢺଜ new ು; ು.͢(ᣀ); ು.Ճ(105); ು.͢(ϖΫνϯ);
ϥϜμଜ $(ᣀ).Ճ(λ{ Թ < 105 }).ࠞͥΔ(ϖΫνϯ, λ{ Ώͬ͘Γͱ }).ࠞͥΔ(...
ಈࢺଜ ໊ࢺଜ ϥϜμଜ
ຊͷΰʔϧ
wΞδΣϯμ w։ൃڥ wجຊͱΦϒδΣΫτ wධՁͱ࣮ߦ wϓϩτλΠϓνΣʔϯ wUIJTଋറ wείʔϓνΣʔϯ
ݥͷ४උ
None
None
ຊؾʹͳͬͨΒ
None
None
None
None
None
None
ϞμϯΛࣹఔڑʹஔ͘
ಈࢺଜ
var a = 1; function func(b) { return a +
b; } func(10); //=> 11
var a = 1; function func(b) { return a +
b; } func(10); //=> 11 มએݴ
var a = 1; function func(b) { return a +
b; } func(10); //=> 11 ؔએݴ
var a = 1; function func(b) { return a +
b; } func(10); //=> 11 Ҿ ฦΓ
var a = 1; function func(b) { return a +
b; } func(10); //=> 11 ֎෦มͷࢀর
var a = 1; function func(b) { return a +
b; } func(10); //=> 11 ؔݺͼग़͠
var a = 1; function func(b) { return a +
b; } func(10); //=> 11 ࣝผࢠ
var a = 1; function func(b) { return a +
b; } func(10); //=> 11
ϓϦϛςΟϒ ͱ ΦϒδΣΫτ
ͱ OFX/VNCFS
B ͱ OFX4USJOH B
۠ผͰ͖ͳ͍ ͱ ۠ผͰ͖Δ
ͱ OFX/VNCFS OFX/VNCFS
Λ͢ ͱ ࢀরΛ͢
WBSBC ͱ WBSBC OFX/VNCFS
୯Ұͷ ͱ ঢ়ଶΛ࣋ͭ
var n = new Number(1); n["prop1"] = 1; n["prop1"]; //=>
1 n.prop2 = 2; n.prop2; //=>2 Ç QSPQ O QSPQ
ϓϦϛςΟϒ ΦϒδΣΫτ ൺֱ ಉੑ ಉҰੑ ೖ ࢀর ঢ়ଶͷอ࣋ ʷ
˓
wϓϦϛςΟϒ ‣ /B/ ‣จࣈྻ B BC
‣ਅِ USVF GBMTF ‣OVMM ‣VOEFpOFE
wΦϒδΣΫτ ‣0CKFDU ‣"SSBZ ‣/VNCFS ‣4USJOH ‣#PPMFBO ‣'VODUJPOͳͲ
wΦϒδΣΫτ ‣0CKFDU ‣"SSBZ ‣/VNCFS ‣4USJOH ‣#PPMFBO ‣'VODUJPOͳͲ
var obj = new Object; obj.a = 1; obj.a; //=>
1 var obj = { a: 1 }; obj.a; //=>1
var arr = new Array; arr[0] = 1; arr[0]; //=>
1 var arr = [1, 2]; arr[0]; //=> 1
var arr = [1, 2]; arr[100] = 3; arr.a =
1; BSS B
wΦϒδΣΫτ ‣0CKFDU ‣"SSBZ ‣/VNCFS ‣4USJOH ‣#PPMFBO ‣'VODUJPOͳͲ
new Number(1) + new Number(2); //=> 3
(1).a = 1; (1).a; //=> undefined; (new Number(1)).a = 1;
(new Number(1)).a; //=> undefined
wΦϒδΣΫτ ‣0CKFDU ‣"SSBZ ‣/VNCFS ‣4USJOH ‣#PPMFBO ‣'VODUJPOͳͲ
function a(){} var b = a; b(); var c =
function() { }; c();
var obj = { m: function(a) { return a +
1; } }; obj.m(1); //=> 2
ධՁͱ࣮ߦ
var a, b = 1; a = 2; function c(d)
{ var e = 5; } c(2);
var a, b = 1; a = 2; function c(d)
{ var e = 5; } c(2);
a(); function a(){} b(); //ERROR var b = function(){};
TDSJQU IUNM
var a, b = 1; a = 2; function c(d)
{ var e = 5; } c(2);
var a = 1; function f1() { var b =
2; function f2() { var c = 3; }; }
if(false) { var a = 1; } for(var i=0; i<3;
i++) { }
໊ࢺଜ
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12 OFXࣜ
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12 ίϯετϥΫλ
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12 Πϯελϯε
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12 ϓϩτλΠϓ
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12 ϝιου
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
.Z OFX ίϯετϥΫλ Πϯελϯε B
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
N .Z OFX ίϯετϥΫλ ϓϩτλΠϓ Πϯελϯε ҕৡ QSPUPUZQF B
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12 OFX0CKFDU
N .Z OFX ίϯετϥΫλ ϓϩτλΠϓ Πϯελϯε ҕৡ QSPUPUZQF UP4USJOH 0CKFDU
ҕৡ ϓϩτλΠϓ ίϯετϥΫλ OFX QSPUPUZQF B
N .Z OFX ίϯετϥΫλ ϓϩτλΠϓ Πϯελϯε ҕৡ QSPUPUZQF B $MBTT
w+BWBͰͷΫϥε ˒ςϯϓϨʔτ ˒ڇ ˒֓೦
w+BWBͰͷΫϥε ˒ςϯϓϨʔτ ˒ڇ ˒֓೦
ςϯϓϨʔτ ͨ͜ম͖ͷܕ ઃܭॻ ܗ Original Update by Will Scullin
Ϋϥεͬͯखஈʁ Original Update by Will Scullin
Original Update by Keith Williamson
Original Update by Keith rfranklinaz
ςϯϓϨʔτ ͨ͜ম͖ͷܕ ઃܭॻ ܗ Original Update by Will Scullin
Ϋϥεͬͯܕʁ Original Update by Will Scullin
Original Update by Leo-setä
var my = new My(1); my.m2 = function() { };
my.m2();
w+BWBͰͷΫϥε ˒ςϯϓϨʔτ ˒ڇ ˒֓೦
Original Update by admiller ݘ͕ϫϯϫϯ ڇ͕ϞʔϞʔ ೣ͕χϟʔ
Original Update by admiller Ϋϥεͬͯෆมʁ
$("#div_id") .toggleClass('oldClass newClass');
4* 3VCZJTU ͓̽͡͞ ߨࢣ ͓͞Μ /&8
ޱ࠲ Original Update by Dirk_Vorderstraße
var n = new Number(1); n instanceof Number; //=> true
n.__proto__ = String.prototype n instanceof Number; //=> false n instanceof String; //=> true
Original Update by admiller Ϋϥεͬͯ ඞਢʁ
ԿऀʹͳΕͳ͍ ΦϒδΣΫτ
Object.prototype instanceof Object; //=> false Object.create(null) instanceof Object; //=> false
w+BWBͰͷΫϥε ˒ςϯϓϨʔτ ˒ڇ ˒֓೦
Original Update by Keith jodelli ֓೦ͱ࣮ମ ΠσΞͱ࣮ࡏ ʮBQQMFʯͱʮBOBQQMFʯ
"QQMF OFX Ϋϥεఆٛ Πϯελϯε ιʔείʔυ ΠσΞ ϝϞϦ ݱ࣮ BQQMF
Apple? "QQMF OFX Ϋϥεఆٛ ΫϥεΦϒδΣΫτ Πϯελϯε DMBTT ιʔείʔυ ֓೦ ϝϞϦ
ݱ࣮ BQQMF
Apple? "QQMF OFX Ϋϥεఆٛ ΫϥεΦϒδΣΫτ Πϯελϯε DMBTT ιʔείʔυ ֓೦ ϝϞϦ
ݱ࣮ BQQMF $MBTT
N .Z OFX ίϯετϥΫλ ϓϩτλΠϓ Πϯελϯε ҕৡ QSPUPUZQF B $MBTT
N .Z OFX ίϯετϥΫλ ϓϩτλΠϓ Πϯελϯε ҕৡ QSPUPUZQF B
0CKFDU
0CKFDU $MBTT
Original Update by Keith Williamson
Original Update by Keith rfranklinaz
0CKFDU $MBTT
$("#div_id") .toggleClass('oldClass newClass');
&MFNFOU $MBTT
Apple? "QQMF OFX Ϋϥεఆٛ ΫϥεΦϒδΣΫτ Πϯελϯε DMBTT ιʔείʔυ ֓೦ ϝϞϦ
ݱ࣮ BQQMF
0CKFDU $MBTT
Original Update by Leo-setä
0CKFDUϓϩτλΠϓ 0CKFDUΠϯελϯε
var n = new Number(1); n instanceof Number; //=> true
n.__proto__ = String.prototype n instanceof Number; //=> false n instanceof String; //=> true
Object.prototype instanceof Object; //=> false Object.create(null) instanceof Object; //=> false
0CKFDUϓϩτλΠϓ ܧঝΦϒδΣΫτ .ZϓϩτλΠϓ
0CKFDUϓϩτλΠϓ 0CKFDUΠϯελϯε .ZϓϩτλΠϓ .ZΠϯελϯε
Object prototype prototype obj2 new MyClass my1 my2
.Z Ϋϥεఆٛ Πϯελϯε DMBTT ιʔείʔυ ֓೦ ϝϞϦ ݱ࣮ BQQMF 0CKFDU
Ϋϥεఆٛ DMBTT நઢ ܧঝઢ $MBTT$MBTT
N ҕৡઢ ϓϩτλΠϓ Πϯελϯε UP4USJOH ϓϩτλΠϓ B 'VODUJPOϓϩτλΠϓ .Z 0CKFDU
.Z Ϋϥεఆٛ Πϯελϯε DMBTT ιʔείʔυ ֓೦ ϝϞϦ ݱ࣮ BQQMF 0CKFDU
Ϋϥεఆٛ DMBTT நઢ ܧঝઢ $MBTT$MBTT
.Z Ϋϥεఆٛ Πϯελϯε DMBTT ιʔείʔυ ֓೦ ϝϞϦ ݱ࣮ BQQMF 0CKFDU
Ϋϥεఆٛ DMBTT நઢ ܧঝઢ $MBTT$MBTT
N ҕৡઢ ϓϩτλΠϓ Πϯελϯε UP4USJOH ϓϩτλΠϓ B 'VODUJPOϓϩτλΠϓ .Z 0CKFDU
N ҕৡઢ ϓϩτλΠϓ Πϯελϯε UP4USJOH ϓϩτλΠϓ B 'VODUJPOϓϩτλΠϓ .Z 0CKFDU
UIJTࢀর
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
B N 0CKFDU
N B B N
N B B N
ؔ Ҿ ฦΓ ҾϦετ ؔຊମ
ؔ Ҿ ฦΓ UIJTҾ ڥ
a.b(); a.b<<a>>(); a.b.c(); a.b.c<<b>>();
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1<<my>>(10); //=> 12
ͲΜͳUIJTม͑Δ ࠷ڧͷໃ 'VODUJPODBMM
function func(b) { this.a; } func.call({a:1}, 10);
function func(b) { this.a; } func.call({a:1}, 10);
ͲΜͳࢦఆ͔ΒकΔ ࠷ڧͷ६ 'VODUJPOCJOE
function func(b) { this.a; } func.bind({a:1})(10);
function func(b) { this.a; } func.bind({a:1})(10);
function func(b) { this.a; } func.bind({a:1})(10);
func.bind({a:1}) .call({a:2}); ΄͜ʷͨͯ 'JHIU
function MyUI($el, a) { this.a = a; $el.click(this.m); } MyUI.prototype.m
= function(){ this.a };
function MyUI($el, a) { this.a = a; $el.click(this.m); } MyUI.prototype.m
= function(){ this.a };
function MyUI($el, a) { this.a = a; $el.click(this.m); } MyUI.prototype.m
= function(){ this.a };
function MyUI($el, a) { this.a = a; $el.click(this.m.bind(this)); } MyUI.prototype.m
= function(){ this.a };
ؔ Ҿ ฦΓ UIJTҾ ڥ UIJT
func.call(undefined); func.call(null); func.call(1); func.call(“a”); func.call(true);
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
function My(a) { this.a = a; } My.prototype = {
m1: function(b) { return this.a + b; } }; var my = new My(1); my.a; //=> 1 my.a = 2; my.m1(10); //=> 12
એ
ϥϜμଜ
function a(func) { return func.call(this, 1); } a(function(b) { return
b + 10; }); //=> 11
function a(func) { return func.call(this, 1); } a(function(b) { return
b + 10; }); //=> 11
function a(func) { return func.call(this, 1); } a(function(b) { return
b + 10; }); //=> 11
function a() { return function() { return 1; }; }
var b = a(); b(); //=>1
(function(a) { return a + 10; })(1); //=> 11
func1 func2 4DPQF ؔ
func1 func2 func1 func2 4DPQF ؔ ؔ
ؔ Ҿ ฦΓ UIJTҾ ڥ UIJT
ؔ ڥΫϩʔδϟ
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
Ϋϥε Ϋϩʔδϟ ঢ়ଶ ෳ ෳ ৼΔ͍ ෳ Ұͭ
function sum(a, b) { return a + b; } var
left = 1; //.... var right = 2; sum(left, right);
function left(a) { return function(b) { return a + b;
}; } var right = left(1); //..... right(2);
MyUI.prototype.do_something = function() { var self = this; this.$el.click(function() {
$(this).val(self.a); }); }
MyUI.prototype.do_something = function() { var self = this; this.$el.click(function() {
$(this).val(self.a); }); }
var a = 1; function func(refA) { var a =
10; return refA(); } func(function() { return a; });
var a = 1; function func(refA) { var a =
10; return refA(); }; func(function() { return a; });
var a = 1; function func() { return a++; };
func(); func();
var a = 1; function func() { return a++; };
func(); func();
var a = 1; function func() { return a++; };
func(); func();
var a = 1; function func() { return a++; };
func(); func();
var a = 1; function func() { return a++; };
func(); func();
var a = 1; function func() { return a++; };
func(); func();
a=1 func
var a = 1; function func() { return a++; };
func(); func();
a=1 func
var a = 1; function func() { return a++; };
func(); func();
a=2 func
var a = 1; function func() { return a++; };
func(); func();
a=2 func
var a = 1; function func() { return a++; };
func(); func();
a=3 func
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
a=1 b,c func
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
a=1 b,c func a=10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
a=1 b,c func a=10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
a=1 b,c func a=10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
a=1 b,c func a=12
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
a=1 b,c func a=12 a=10
var a = 1; function func() { var a =
10; return function() { return a++; }; } var b = func(); b(); //=> 10 b(); //=> 11 var c = func(); c(); //=> 10
a=1 b,c func a=12 a=11
var a = 1; function func() { var a =
10; return new Function("", "return a++;") } var b = func(); b();
var a = 1; function func(refA) { var a =
10; return refA(); } func(function() { return a; });
var a = 1; function func(refA) { var a =
10; return refA(); } func(function() { return a; });
var a = 1; function func(refA) { var a =
10; return refA(); } func(function() { return a; });
a=1 func
var a = 1; function func(refA) { var a =
10; return refA(); } func(function() { return a; });
a=1 func refA a=10
var a = 1; function func(refA) { var a =
10; return refA(); } func(function() { return a; });
a=1 func refA a=10
var a = 1; function func(refA) { var a =
10; return refA(); } func(function() { return a; });
a=1 func refA a=10
·ͱΊ
wΞδΣϯμ w։ൃڥ wجຊͱΦϒδΣΫτ wධՁͱ࣮ߦ wϓϩτλΠϓνΣʔϯ wUIJTଋറ wείʔϓνΣʔϯ
࣮ࡍશ෦͏
ภΔͷෆࣗવ
+BWB ໊ࢺͷԦࠃ ͩͬͨ
"DUJPOFYFDVUF 9Y.BOBHFSNBOBHF 9Y#VJMEFSCVJME
৭Μͳදݱ͕͋Δํ͕ ָ͍͠
ಈࢺଜ ໊ࢺଜ ϥϜμଜ
͋Γ͕ͱ͏͍͟͝·ͨ͠