Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.javascript > #18008
| Path | csiph.com!v102.xanadu-bbs.net!xanadu-bbs.net!us.feeder.erje.net!feeder.erje.net!eu.feeder.erje.net!eternal-september.org!feeder.eternal-september.org!mx04.eternal-september.org!.POSTED!not-for-mail |
|---|---|
| From | JJ <jaejunks@nah.meh> |
| Newsgroups | comp.lang.javascript |
| Subject | Re: Global variable is deletable? |
| Date | Mon, 7 Jan 2013 15:36:17 +0000 (UTC) |
| Organization | A noiseless patient Spider |
| Lines | 36 |
| Message-ID | <XnsA141E6C0BB03Bjj@0.0.0.17> (permalink) |
| References | <95a66842-702a-416d-9575-e47c82e6667e@googlegroups.com> <kce7oa$h9o$1@news.albasani.net> |
| Injection-Date | Mon, 7 Jan 2013 15:36:17 +0000 (UTC) |
| Injection-Info | mx04.eternal-september.org; posting-host="5b92e8199170de57ee52b7716f119bc2"; logging-data="19136"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/P/hEAR/wVdjnUOFWsEZmP0IEApmMzY1U=" |
| User-Agent | Xnews/5.04.25 |
| X-Face | \*\`0(1j~VfYC>ebz[&O.]=,Nm\oRM{of,liRO#7Eqi4|!]!(Gs=Akgh{J)605>C9Air?pad{sSZ09u+A7f<^paR"/NH_#<mE1S"hde\c6PZLUB[t/s5-+Iu5DSc?P0+4%,Hl |
| Cancel-Lock | sha1:lVRUfS0GTTdM+iBBZqF6TxUy9jQ= |
| Xref | csiph.com comp.lang.javascript:18008 |
Show key headers only | View raw
Stefan Weiss <krewecherl@gmail.com> wrote: > On 2013-01-07 10:21, Thomas Li wrote: >> Hi, I'm fresh in Javascript. From the book "Javascript, the >> definitive guide", the global variable should be nondeletable, >> however when I test it in IE, it is deletable, anything wrong? >> Steps: >> 1. Open IE 9 >> 2. Press F12 and select Console panel >> 3. Var temp = 1; >> delete temp; >> 4. it returns true and when I enter temp, it says "temp is undefined" > > When you enter something in the console, it gets evaluated with eval(). > Variables created from eval()ed code don't have the DontDelete flag set. > > Details: > http://perfectionkills.com/understanding-delete/#firebug_confusion > > > - stefan I'd toss that book. <!DOCTYPE html> <html> <body> <script> console.log(typeof abc); //undefined abc=123; console.log(typeof abc); //number delete abc; console.log(typeof abc); //undefined </script> </body> </html>
Back to comp.lang.javascript | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Global variable is deletable? Thomas Li <cooooooder@gmail.com> - 2013-01-07 01:21 -0800
Re: Global variable is deletable? Stefan Weiss <krewecherl@gmail.com> - 2013-01-07 11:24 +0100
Re: Global variable is deletable? JJ <jaejunks@nah.meh> - 2013-01-07 15:36 +0000
Re: Global variable is deletable? Scott Sauyet <scott.sauyet@gmail.com> - 2013-01-07 07:50 -0800
Re: Global variable is deletable? Thomas Li <cooooooder@gmail.com> - 2013-01-07 22:08 -0800
Re: Global variable is deletable? dann90038@gmail.com - 2013-01-07 13:25 -0800
Re: Global variable is deletable? Thomas Li <cooooooder@gmail.com> - 2013-01-07 21:48 -0800
csiph-web