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
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
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
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
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;
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
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