Javascript teszt kérdés lehet

Mi a kimenete az alábbi kód(ok)nak?

function a(version) {

this.version = version;

}

a.prototype.version = ‘1.8’;

var b = new a(‘1.8.1’);

delete b.version;

var c = b.version;

alert(c);

/*
function a() {

(‘Outer function!’);

return function(){

(‘Inner function!’);

};

}

var a = a();

a();
*/

//(typeof(Infinity));

/*
var a = ‘1’;

b = 2 * a;

c = typeof(b);

(c);

*/

/*
function a() {

var x = [];

var i = 0;

a[i] = function(){

return i;

}

i++;

(a[0]());

}

a();

*/

//(null == null);

//(self == window);

/*

if (document.addEventListener){

(“addEventListener”);

} else if (document.attachEvent){

(“attachEvent”);

*/

/*
function a(){}

var b = typeof(a.prototype);

(b);
*/

/*
var a = {a1: 1, a2: 2};

var b = 0;

for (i in a) {

b += a[i];
}

(b);

*/

/*

var a = {f: 1};

var b = a;

b.f = 100;

var c = a.f;

(c);
*/
//(typeof(somevar));

/*

function test()

{

return “Hello”;

}

alert(test());

*/

 

15 Great JavaScript Interview Questions