JavaScript: Problems added in February 2016


Problem 2016-02-21-13-38

complexity: 3 ; importance: 5; author: docentmail

Question:What is percentage of support ECMAScript 5 in modern browsers?


Problem 2016-02-21-13-10

complexity: 3 ; importance: 5; author: docentmail

Question:What is percentage of support ECMAScript 6.0 in modern browsers?


Problem 2016-02-21-13-07

complexity: 4 ; importance: 5; author: docentmail

Question:Why standard for JavaScript has name ECMAScript?


Problem 2016-02-20-23-57

complexity: 2 ; importance: 6; author: docentmail

Question:What is the latest standard of ECMA script?


Problem 2016-02-20-23-51

complexity: 4 ; importance: 5; author: docentmail

Question:Which version of ECMA script is supported by current browsers?


Problem 2016-02-20-23-40

complexity: 2 ; importance: 4; author: docentmail

Question:What is the name of organization that maintains JavaScript standards?


Problem 2016-02-20-13-16

complexity: 2 ; importance: 3; author: docentmail

Question:What is the generic name of the values which evaluates to false?


Problem 2016-02-20-13-13

complexity: 2 ; importance: 3; author: docentmail

Question:What is the generic name of the values which evaluates to true?


Problem 2016-02-20-13-10

complexity: 2 ; importance: 5; author: docentmail

Question:Give definition for "truthy/falsy values" with if statement.


Problem 2016-02-20-12-48

complexity: 4 ; importance: 5; author: docentmail

Question:List all falsy values.


Problem 2016-02-11-23-48

complexity: 6 ; importance: 2; author: docentmail

Question: Why do you get the error Fix errors in you script: TypeError: a is not a function for the snippet?

var a=1
var b=a
(function() {
   alert('hello');
})();


Problem 2016-02-11-23-31

complexity: 2 ; importance: 24; author: docentmail

Question: What would be result of execution of the snippet?

var x=1, y=1;
x
--
y
alert(x);
alert(y);


Problem 2016-02-11-17-42

complexity: 2 ; importance: 24; author: docentmail

Question: What is typeof null;?

alert(typeof null);


Problem 2016-02-11-17-30

complexity: 2 ; importance: 2; author: docentmail

Question: What would be message of the alert?

function fun(aaa   /* some comments */ ){
 // this is another comment
 return 'hello';
}

alert (fun);


Problem 2016-02-11-17-15

complexity: 5 ; importance: 2; author: docentmail

Question: Give values for variables a and b to force first alert print true and second prints false.

var a=?;
var b=?;
    
alert(' a == b '  + (a == b) );
alert(' a===b '+ (a === b) );


Problem 2016-02-11-17-00

complexity: 5 ; importance: 2; author: docentmail

Question: What is the name of the practice and what is the purpose of starting libraries with ";"?

;(function () {.......


Problem 2016-02-10-17-15

complexity: 2 ; importance: 3; author: docentmail

Question: Write the snippet into a single line. Insert semicolons to make the snippet understandable and not to change the snippet logic.

x = d 
(f+g ).some_method()


Problem 2016-02-10-17-12

complexity: 2 ; importance: 3; author: docentmail

Question: What is result of execution of the snippet?

function a(){
     return
       1;
}
alert (a());


Problem 2016-02-10-17-10

complexity: 2 ; importance: 3; author: docentmail

Question: Is this a valid JavaScript snippet?

var 
foo
=
10
alert(foo)


Problem 2016-02-10-17-08

complexity: 2 ; importance: 3; author: docentmail

Question: Are these a valid JavaScript statements?

i       ++;
i
++;