JScript branded quirks check in IE9

V

VK

Not to say these quirks are having any practical importance, but i)
named function expression namespace and ii) terminal elision treatment
are IE's JScript "branded" features since forever.

If anyone has IE9 installed could you tell the results for:

(function f() {
/* NOP */
})();

var arr = [0,1,];

// Should be undefined, IE<=8 gives function
window.alert('type of f: ' + typeof f);

// Should be 2, IE<=8 gives 3
window.alert('array length: ' + arr.length);

Just curious how IE "sticks to the traditions" :)
 
R

RobG

(function f() {
  /* NOP */
})();
var arr = [0,1,];
// Should be undefined, IE<=8 gives function
window.alert('type of f: ' + typeof f);

Here IE9 gives
type of f: undefined

With compatibility view on
type of f: function
// Should be 2, IE<=8 gives 3
window.alert('array length: ' + arr.length);

array length: 2

With compatibility view on
array length: 3

Wow, what happened at MS? They're getting serious about this standards
compliance thing - even implementing stuff from ES 5. Before you know
it, they'll be supporting canvas - oh wait, they've done that.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,584
Members
45,077
Latest member
SangMoor21

Latest Threads

Top