JavaScript DELETE statement. Query - Stack Overflow

I was just wondering if the DELETE statement is supported by all browsers e.g:delete myObj;I just want

I was just wondering if the DELETE statement is supported by all browsers e.g:

delete myObj;

I just want to make 100% sure if all browsers support this or not? Also is there any browser or maybe mobile (cell) phones that do not?

I was just wondering if the DELETE statement is supported by all browsers e.g:

delete myObj;

I just want to make 100% sure if all browsers support this or not? Also is there any browser or maybe mobile (cell) phones that do not?

Share Improve this question edited Aug 12, 2014 at 7:43 Sam 7,39816 gold badges47 silver badges68 bronze badges asked Jan 9, 2010 at 20:58 ValVal 17.5k24 gold badges98 silver badges148 bronze badges 3
  • 3 Not all browsers support Javascript, so no. – Mark Byers Commented Jan 9, 2010 at 21:00
  • 1 delete is used to remove properties from objects (ie delete foo.bar, delete foo[42], ...); strict-mode ES5 will even throw an SyntaxError if you incorrectly use it on local variables... – Christoph Commented Jan 9, 2010 at 21:30
  • 2 @MarkByers Not all puters have mice. That doesn't mean I shouldn't write GUI's. I think it time for use to accept that the 'scriptless' web is deprecated, and not worth our design consideration any more the IE7 or the Netscape browser are. – gbtimmon Commented Feb 28, 2013 at 18:43
Add a ment  | 

2 Answers 2

Reset to default 9

Mozilla's Developer Center provides the following information:

Implemented in: JavaScript 1.2, NES3.0
ECMA Version:   ECMA-262

So you can check your target browser against this for an idea of whether it's supported at all or not.

Extreme testing of JavaScript delete operator on different browsers seems to suggest that nearly all major browsers do support it, just not equally well. Furthermore, the author provides an extreme test page for you to experiment with your browser online at http://www.trilancer./extreme_delete.html

I would also consider reading the following question for more details on how to property use the delete operator:

  • Deleting Objects in Javascript

To directly answer your question, as far as I am aware, any browser that supports JavaScript supports delete. I checked and it existed in the specification for ECMAScript 1 (released in 1997) so it's been around for a while now.

发布者:admin,转转请注明出处:http://www.yc00.com/questions/1743728304a4496999.html

相关推荐

  • JavaScript DELETE statement. Query - Stack Overflow

    I was just wondering if the DELETE statement is supported by all browsers e.g:delete myObj;I just want

    6天前
    10

发表回复

评论列表(0条)

  • 暂无评论

联系我们

400-800-8888

在线咨询: QQ交谈

邮件:admin@example.com

工作时间:周一至周五,9:30-18:30,节假日休息

关注微信