Jslunch1

1,070 views

Published on

Published in: Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
1,070
On SlideShare
0
From Embeds
0
Number of Embeds
13
Actions
Shares
0
Downloads
0
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Jslunch1

  1. 1. var proto = { hoge: 1 }; var func = function() {}; func.prototype = proto; var obj = new func(); alert( obj.hoge ); // 1 obj.hoge = 2; alert( obj.hoge ); // 2 proto.hoge = 3; alert( obj.hoge ); // 2 delete obj.hoge; alert( obj.hoge ); // 3 delete proto.hoge; alert( obj.hoge ); // undefined

×