JS Quiz 1 | 121 Coaching Online Coaching Digital Coaching

Online Quiz - Java Script

Take Quiz from our Quiz Bank - Based on Age Group - Earn by Excellence

Java Script

Please enter your email:

Predict the output of the following JavaScript code.

<script type="text/javascript" language="javascript">
 
var x=5;
var y=6;
var res=eval("x*y");
document.write(res);
 
</script>
 
 
 
 

 How to write an ‘if’ statement for executing some code.If “i” is NOT equal to 8?

 
 
 
 

 Predict the output of the following JavaScript code.

<script type="text/javascript">
var a="GeeksforGeeks";
var x=a.lastIndexOf("G");
document.write(x);
</script>
 
 
 
 

What is the method in JavaScript used to remove the whitespace at the beginning and end of any string ?

 
 
 
 

What will be the output of the following code?

<script>
document.write(typeof(24.49));
</script>
 
 
 
 

What is the JavaScript syntax for printing values in Console?

 
 
 
 

What is the correct syntax for adding comments in JavaScript?

 
 
 
 

How is the function called in JavaScript?

 
 
 
 

JavaScript is a ________ Side Scripting Language.

 
 
 
 

How to initialize an array in JavaScript?

 
 
 
 

Which of the following is not a reserved word in JavaScript?

 
 
 
 

What is the syntax for creating a function in JavaScript named as Geekfunc?

 
 
 
 

Which of the following is an advantage of using JavaScript?

 
 
 
 

Predict the output on the console for the following JavaScript code.

<script>
let geek = 'GeeksforGeeks';
 
console.log(typeof geek);
 
geek=1;
 
console.log(typeof geek);
</script>
 
 
 
 

Choose the correct JavaScript syntax to change the content of the following HTML code.

<p id="geek">GeeksforGeeks</p>

 
 
 
 

In JavaScript, we do not have datatypes like integer and float. What is the function that can be used to check if the number is an integer or not?

 
 
 
 

Predict the output of the following JavaScript code.

 
 
 
 

 Predict the output on the console for the following JavaScript code.

<script>
let myName = "121";
let myCity = "121stan";
 
console.log(`My name is ${myName}. My favorite city is ${myCity}.`)
</script>
 
 
 
 

Which of the following is the correct syntax to display “GeeksforGeeks” in an alert box using JavaScript?

 
 
 
 

What will be the command to print the number of characters in the string “121”?

 
 
 
 

 The external JavaScript file must contain <script> tag. True or False?

 
 
 
 

Predict the output on the console for the following JavaScript code.

<script>
     
    function geek() {
    if(true) {
        var a = 5;
    }
    document.write(a);
}
geek();                    
 
</script>
 
 
 
 

Predict the output of the following JavaScript code.

<script type="text/javascript" language="javascript">
 
var a = "GeeksforGeeks";
var result = a.substring(4, 5);
document.write(result);
 
</script>
 
 
 
 

Which was the first browser to support JavaScript?

 
 
 
 

Which function of an Array object calls a function for each element in the array?

 
 
 
 

Question 1 of 25

  • You can appear only once for each Quiz 
  • Your First appearance result will be considered & complete within time
  • Once you score Above 20 out of 25, you get Online Voucher for Rs. 250*
  • Once you score Above 10 out of 25, you get Online Voucher for Rs. 100*
  • Once you score Above 5 out of 25, you get Online Voucher for Rs. 50*
  • Your Coupon Code will be provided at end of Quiz, once you succeed
  • Beware of Negative Marks while answering without confidence
  • We recommend Participants to Register & Login for Track Back Performance
  • If you plan to reappear,  delete cookies (Ctrl + Shift + Delete) Keys from your computer
Become an Online Tutor - Earn Rs. 300 to Rs. 1,000 Per Hour - Daily Payment - Utilize your Free Time - Apply Now
Share us in your Social Media...
error: Content is protected !!