// Copyright 2009 the Sputnik authors. All rights reserved. // This code is governed by the BSD license found in the LICENSE file. /** * Function declarations in global or function scope are {DontDelete} * * @path ch13/13.0/S13_A12_T1.js * @description Checking if deleting a function that is declared in global scope fails */ ALIVE="Letov is alive" function __func(){ return ALIVE; }; ////////////////////////////////////////////////////////////////////////////// //CHECK#1 if (delete __func) { $ERROR('#1: delete __func returning false'); } // ////////////////////////////////////////////////////////////////////////////// ////////////////////////////////////////////////////////////////////////////// //CHECK#2 if (__func() !== ALIVE) { $ERROR('#2: __func() === ALIVE. Actual: __func() ==='+__func()); } // //////////////////////////////////////////////////////////////////////////////
Source: https://habr.com/ru/post/J130377/More articles:木について少しStudent Day 2011のオンラインブロードキャストを見る独立開発者による一般統計-Johnny-K(続き)JQuery 1.7ベータ2リリースノート1歳の子供にとって、雑誌は壊れたiPadですV-RayおよびIray。 比較とレビュー2億人のユーザーが既にGoogle Chromeを使用していますUbuntu 11.04 amd64で無料のスパイス仮想化を試すリアルな360度フライトシミュレーターカメラ角度制御All Articles