CoderMantra

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

javascript-exam

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

JavaScript Questions

1 / 15

1. Which of the following function of the String object returns the character in the string starting at the specified position via the specified number of characters?

2 / 15

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

// Javascript code to compare the height
function height()
{ 
    var  height = 123.56;
    var type = (height>=190) ? "tall" : "short";
    return type;
}

3 / 15

3. Which is the function used to call a function in every time duration?

4 / 15

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

const curr = new Date();
 document.write(curr);

5 / 15

5. 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);
     }
}

6 / 15

6. What does … operator do in JS?

7 / 15

7. What is the purpose of the Attr object in the HTML DOM ?

8 / 15

8. What is the result in the console of running the code shown?
var start = 1;
function setEnd() {
var end = 10;
}
setEnd();
console.log(end);

9 / 15

9. Which property is used to define the HTML content to an HTML element with a specific id?

10 / 15

10. Arrays in JavaScript are defined by which of the following statements?

11 / 15

11. Which is the correct syntax for the function definition?

12 / 15

12. in javascript "===" operator defines what?

13 / 15

13. The "function" and " var" are known as:

14 / 15

14.  Which of the following can be implemented using animation?

15 / 15

15. Which JavaScript method is used to access an HTML element by id?

Your score is

LinkedIn Facebook VKontakte
0%

By Wordpress Quiz plugin

Category

  • AI
  • 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++
  • data structures
  • 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
  • Why

Archives

  • February 2026
  • December 2025
  • November 2025
  • October 2025
  • September 2025
  • July 2025
  • 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
Graph in Data Structures February 26, 2026
Heap in Data Structures December 31, 2025
AVL Tree in Data Structures December 29, 2025
Binary Search Tree (BST) in Data Structures December 24, 2025
Contact Us

info@codermantra.com

admin@codermantra.com

© 2020 Coder Mantra . All Rights Reserved
About | Privacy Policy | Terms | Contact