| JavaScript Home Page :👈 | 👉:JavaScript question answers 101-120 |
JavaScript Question Answers - 81-100 |
81. Which method displays a dialog box with a message and an OK and a Cancel button
confirm("message")
82. Which property returns the function that created JavaScript's Number prototype
Number.prototype.constructor
83. Which statement breaks one iteration (in the loop) if a specified condition occurs, and continues with the next iteration in the loop
continue;
84. Which method returns the cosine of x (x is in radians)
Math.cos(x)
85. Which method Creates a pop-up window
window.open("url","name","features")
86. Which statement Stops the execution of JavaScript, and calls (if available) the debugging function
debugger;
87. Which method sets or returns the default text in the statusbar of a window
window.status
88. Which statement Executes a block of statements and repeats the block while a condition is true
while (condition) { ... }
89. Which method returns the Document object for the window
window.document
90. Which property returns Euler's number (approx. 2.718)
Math.E
91. What are the decodeURI() and encodeURI()
- encodeURI(): Encodes a URI by escaping special characters.
- decodeURI(): Decodes an encoded URI back to normal form.
92. What are escape characters
Escape characters represent special characters in strings, e.g., \\n (newline), \\t (tab), \\\" (quote).
93. What is event bubbling?
Event bubbling is the process where an event triggered on a child element propagates up to its parent elements in the DOM hierarchy.
94. Which method returns the value of Ex
Math.exp(x)
95. In JavaScript how to display a string using a fixed-pitch font
document.write("Hello".fixed());
96. Which method returns x, rounded downwards to the nearest integer
Math.floor(x)
97. Which method Sets focus to the current window
window.focus()
98. What are all the looping structures in JavaScript
- for
- while
- do...while
- for...in
- for...of
99. What are JavaScript types
- Primitive: Number, String, Boolean, Undefined, Null, Symbol, BigInt
- Non-primitive: Object
100. In JavaScript how to display a string using a specified color
document.write("Hello".fontcolor("red"));
| JavaScript Home Page :👈 | 👉:JavaScript question answers 101-120 |