JavaScript average (4-7) complexity
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'); })();
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) );
complexity: 5 ; importance: 2; author: docentmail
Question: What is the name of the practice and what is the purpose of starting libraries with ";"?
;(function () {.......
complexity: 5 ; importance: 4; author: docentmail
Question: What would be result of execution of the snippet?
function myFunction(){ alert("Hello from myFunction "); } function testFunctionHoisting(){ alert(typeof myFunction); myFunction(); var myFunction = function() { alert("hello from local myFunction"); }; } testFunctionHoisting();
complexity: 5 ; importance: 2; author: docentmail
Question: how many times method do() would be called?
for (i = 0, j=3; i < j; i++,j-- ) { do(); }
complexity: 5 ; importance: 1; author: docentmail
Question: What would be result of execution of expresion?
typeof typeof 123 or the same with parenthis typeof(typeof(123))
complexity: 4 ; importance: 5; author: docentmail
Question:Which version of ECMA script is supported by current browsers?
complexity: 4 ; importance: 5; author: docentmail
Question: Develop an snippet to use "if" statement to alert "type is number" if in case the type variable "theVar" is number, "type is string" if type is string less, "type is something else" otherwise.
complexity: 4 ; importance: 5; author: docentmail
Question:Why standard for JavaScript has name ECMAScript?
complexity: 4 ; importance: 5; author: docentmail
Question:List all falsy values.
complexity: 4 ; importance: 2; author: docentmail
Question: What world would be the result for each line?
typeof "John"; typeof 3.14; typeof false; typeof [1,2,3,4]; typeof {name:'John', age:34};