CoderMantra

Menu
  • Home
  • Quiz
  • How-To
  • Q/A
  • Blog

javascript-exam

0 votes, 0 avg
535
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15

JavaScript Questions

1 / 15

1. Which JavaScript method is used to create a new array with array elements that passes a test?

2 / 15

2. Where is Client-side JavaScript code is embedded within HTML documents?

3 / 15

3. What will be the output of the following code snippet?

const obj1 = {Name: "Hello", Age: 16};
const obj2 = {Name: "Hello", Age: 16};
print(obj1 === obj2);

4 / 15

4. What will be the output of the following JavaScript code?

function printArray(a) 
{
     var len = a.length, i = 0;
     if (len == 0)
        console.log("Empty Array");
     else 
     {
// do-while loop in javascript
         do 
         {
             console.log(a[i]);
         } while (++i < len);
     }
}

5 / 15

5. What will be the output of the following code snippet?

 print(typeof(NaN)); 

6 / 15

6. What does the Javascript “debugger” statement do?

7 / 15

7. Which JavaScript statements when embedded in an HTML page can respond to user events such as mouse clicks, form input and page navigation

8 / 15

8. What will be the output of the following code snippet?


var a = "Scaler";
var result = a.substring(2, 4);
document.write(result);

9 / 15

9. What will be the output of the following JavaScript code?

  let cars = ['Honda', 'Hyundai'];
    cars.push('Mahindra');
    document.write(typeof cars + " " + cars); 

10 / 15

10. What will be the output of the following code snippet?

(function(a){
 return (function(){
   console.log(a);
   a = 6;
 })()
})(21);

11 / 15

11. What is the central concept of JavaScript memory management?

12 / 15

12. Which of the following global variables is used to get parameters?

13 / 15

13. What does the ‘toLocateString()’ method do in JS?

14 / 15

14. What will be the output of the following code snippet?

function solve(arr, rotations){
 if(rotations == 0) return arr;
 for(let i = 0; i < rotations; i++){
   let element = arr.pop();
   arr.unshift(element);
 }
 return arr;
}
// solve([44, 1, 22, 111], 5);

15 / 15

15. In JavaScript, what is a block of statement?

Your score is

LinkedIn Facebook VKontakte
0%

By Wordpress Quiz plugin

Category

  • Assignments
    • C Language Assignments
    • C++ Assignments
    • Java Assignments
    • Python Assignments
  • C Programming
  • c-plus-plus-Assignments
  • C++
  • Core Java
  • Data Structure
  • Data Structure In C++
  • How To
  • Java-Assignments
  • node js questions
  • nodejs assignments
  • nodejs Projects
  • Practice Questions
  • Python Tutorial
  • Python-Assignments
  • Questions
  • Quiz
  • sql-functions
  • SQL-Tutorial
  • Tkinter Tutorial
  • Uncategorized
  • What Is

Archives

  • April 2025
  • October 2024
  • September 2024
  • June 2024
  • April 2024
  • May 2023
  • April 2023
  • March 2023
  • February 2023
  • May 2022
  • November 2021
  • May 2021
  • March 2021
  • November 2020
  • October 2020
  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • March 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • September 2019
  • August 2019
  • May 2019
  • March 2019
  • February 2019
  • January 2019
About CoderMantra

Coder Mantra is a unique e-learning website, offers a tutorial of different popular programming languages with examples. The code on this popular tutorial website is tested and executed.

Latest Posts
Simple Calculator Program in Python April 25, 2025
Number Guessing Game in Python April 25, 2025
Python Program to Swap Two Variables April 14, 2025
Java Quiz October 6, 2024
Contact Us

info@codermantra.com

admin@codermantra.com

© 2020 Coder Mantra . All Rights Reserved
About | Privacy Policy | Terms | Contact
en Englishhi Hindi
en English