JavaScript hasumaniyaApril 17, 2022May 12, 2022 /10 2 votes, 4.5 avg 18 Created on April 03, 2022 JavaScript multi choice questions 1 / 10 What’s the output?const obj = { a: ‘one’, b: ‘two’, a: ‘three’ };console.log(obj); { b: "two", a: "three" } { a: "three", b: "two" } { a: "one", b: "two" } SyntaxError 2 / 10 Which of the following methods can be used to display data in some form using Javascript? document.write() console.log() window.alert() All of above 3 / 10 What’s the output?!!null;!!”;!!1; false true false false false true false true true true true false Right answer explanation 4 / 10 What’s the output?const numbers = [1, 2, 3];numbers[10] = 11;console.log(numbers); [1, 2, 3, 7 x null, 11] [1, 2, 3, 11] SyntaxError [1, 2, 3, 7 x empty, 11] 5 / 10 Which of the following keywords is used to define a variable in Javascript? let var Both A and B None of above 6 / 10 How to add new value inside WeakMap ?const wkMap = new WeakMap(); wkMap.add(‘Jack’, 1); wkMap.set({name:"Vivek"}, {age:23}); wkMap.addItem(‘Jack’, 1); wkMap.setItem({name:"Vivek"}, {age:23}); 7 / 10 What’s the output?let number = 0;console.log(number++);console.log(++number);console.log(number); 1 1 2 1 2 2 2 2 2 0 2 2 8 / 10 What’s the output?let x = 1;x = (x++, x);console.log(x); 1 2 Compilation error undefined 9 / 10 What would be the output of below code?console.log(num);let num = 20; 20 ReferenceError undefined null 10 / 10 What’s the output?function getAge(…args) { console.log(typeof args);}getAge(21); "number" "object" "array" "NaN" Your score is LinkedIn Facebook Twitter VKontakte 0% Restart quiz Please rate this quiz Send feedback