The ________ used to remove a binding(A) UnBind()(B) unbind()(C) unBind()(D) None of the above
View Answer
What will be the output of the following code snippetconst arr=[1,2,3,4,5]console.log(…arr)(A) [1 2 3 4 5](B) …[1 2 3 4 5](C) 1 2 3 4 5(D) …1 2 3 4 5
View Answer
What will be the output of the following code snippetconst str1=’Geeksfor’const str2=’Geeks’const str3=str1.concat(str2)console.log(str3)(A) GeeksforGeeks(B) GeeksGeeksfor(C) undefined(D) None of the above
View Answer
What will be the output of the following codeconst arr=new set([1,2,2,3,3,4,4,4,4,5,6])console.log(arr)(A) [1,2,3](B) [1,2,3,4,5,6](C) [5,6](D) None of the above
View Answer
What will be the output of the following code snippetconst str1=’GeeksforGeeks’const str2=str1.slice(2,5)console.log(str2)(A) eks(B) eksf(C) Geek(D) Geeksf
View Answer
Is it necessary for the external script file to contain a <script> tag?(A) Yes(B) No(C) Depends on the type of include(D) None of the above
View Answer
Inside which HTML element do we put the JavaScript?(A) <javascript>(B) <js>(C) <src>(D) <script>
View Answer
How many ways are there with which we can declare a variable in javascript?(A) Only one(B) Three(C) Infinitely many(D) None of the above
View Answer
What is the correct syntax for referring to an external script called ‘gfg.js’?(A) <script name=”gfg.js”>(B) <script href=”gfg.js”>(C) <script src=”gfg.js”>(D) None of these
View Answer
Which of the following is the correct syntax for array declaration(A) const arr={1,2,3,4}(B) const arr=[1,2,3,4](C) Both a and b(D) None of the above
View Answer
Is a variable named ‘apple’ same as ‘Apple’ in javascript?(A) Yes(B) No(C) Only when we use ‘strict’(D) None of the above
View Answer
Which method is used to insert a new element at the end of an array(A) unshift()(B) push()(C) pop()(D) None of the above
View Answer
Which of the following variable names are correct according to javascript? (Multiple Choices may be correct)(A) let 1name;(B) let #name;(C) let _name;(D) let $_name;
View Answer
Which of the following is the pop() method does?(A) Display the first element(B) Decrements length by 1(C) Increments length by 1(D) None of the mentioned
View Answer
What will be the output of the following code?<script>document.write(typeof('1' + 2));</script>(A) ‘number’(B) ‘string’(C) ‘boolean’(D) None of the above
View Answer