# 組み込み関数は結構特殊な存在だったのだ! 意外。というか、意識したことがなかった。それに、組み込み関数と同名のオブジェクトを宣言するのはダメなので、それはそう。 ## Python ```python= >>> del print Traceback (most recent call last): File "<stdin>", line 1, in <module> NameError: name 'print' is not defined >>> print = 1 # でも識別子として print は つかえる >>> print 1 >>> del print # 識別子のprintをdelしても... >>> print # 組み込み関数のprintは生きている!!!! <built-in function print> >>> ``` ## JavaScript ### さよならArrayさん... ```javascript= > Array ƒ Array() { [native code] } > Array = 1 1 > Array 1 > delete Array true > Array // さよならArrayさん... VM195:1 Uncaught ReferenceError: Array is not defined at <anonymous>:1:1 (anonymous) @ VM195:1 VM57:1 Uncaught ReferenceError: Array is not defined at t (eval at e.exports (common-vendor.5fa67d7f53b925f0505d.js:1:1), <anonymous>:1:258) at je (eval at e.exports (common-vendor.5fa67d7f53b925f0505d.js:1:1), <anonymous>:1:17044) at Ie (eval at e.exports (common-vendor.5fa67d7f53b925f0505d.js:1:1), <anonymous>:1:17186) at e (eval at e.exports (common-vendor.5fa67d7f53b925f0505d.js:1:1), <anonymous>:1:202) at J (index.2c7e031cfd67aa7dc799.js:2:189477) t @ VM57:1 je @ VM57:1 Ie @ VM57:1 e @ VM57:1 J @ index.2c7e031cfd67aa7dc799.js:2 ``` ### undefinedは死なない! ```javascript= > undefined undefined > undefined = 1 1 > undefined undefined > delete undefined false > undefined undefined ```
×
Sign in
Email
Password
Forgot password
or
By clicking below, you agree to our
terms of service
.
Sign in via Facebook
Sign in via Twitter
Sign in via GitHub
Sign in via Dropbox
Sign in with Wallet
Wallet (
)
Connect another wallet
New to HackMD?
Sign up