Beruflich Dokumente
Kultur Dokumente
1 ) var obj1 = {}; var obj2 = {}; What is the value of (obj1 === obj2)
A. true
B. false
And : false
A. The inner loop resets the outer for-loop, leaving it a fixed position
each time, causing an infinite loop (hint: no block scope).
B. The outer-loop finishes after the first iteration due to a “bug” that
unfortunately is part of the ECMAScript specification.
C. There is no bug. The loop will run correctly.
D. Uncaught SyntaxError.
Ans : A
1 + 5 + ” bottles of milk”;
Ans : C
Ans : C
Ans : C
Ans : B
Ans : D
12)Which of the following asserts that the variables `A`, `B`, and `C`
have unequal values?
A. A !== B || B !== C
B. A !== B & B !== C
C. A !== B && B !== C && A !== C
D. A !== B
Ans :C
Ans: C
14)Consider: var x = [‘a’, ‘b’, ‘c’]; Which line of code will remove the
first element of the array, resulting in x being equal to [‘b’, ‘c’]?
A. x.unshift(0);
B. x.pop();
C. x.splice(0);
SET 1
D. x.splice(0, 1);
Ans : B
CODING ROUND
function createBase(a){
return a+6;
}
function addSix(a) {
var b = createBase(a);
console.log(b);
}
addSix(6);
SET 1
Details
str1 = str1.toLowerCase().split('');
console.log(strArr1);
str2 = str2.toLowerCase().split('');
console.log(strArr2);
console.log(checkAnagram("mary","yrma"));