*
Previous JavaScript question answers 41-60 Interactive Quiz App Next

JavaScript Question Answers - 61-80

61. Which method returns the arcsine of x, in radians

Math.asin(x)

62. Which method returns the arctangent of x as a numeric value between -PI/2 and PI/2 radians

Math.atan(x)

63. Which method returns the arctangent of the quotient of its arguments

Math.atan2(y, x)

64. Which method decodes a base-64 encoded string

atob(encodedString)

65. In JavaScript how to display a string using a big font

document.write("Hello".big());

66. In JavaScript how to display a blinking string

document.write("Hello".blink());

67. Which method removes focus from the current window

window.blur()

68. In JavaScript how to display a string in bold

document.write("Hello".bold());

69. Which statement exits a switch or a loop

break;

70. Which method encodes a string in base-64

btoa(string)

71. Which method returns x, rounded upwards to the nearest integer

Math.ceil(x)

72. Which method returns the character at the specified index (position)

str.charAt(index)

73. Which method returns the Unicode of the character at the specified index

str.charCodeAt(index)

74. Which method Clears a timer set with setInterval()

clearInterval(id)

75. Which method Clears a timer set with setTimeout()

clearTimeout(id)

76. Which method Closes the current window

window.close()

77. Which method returns a Boolean value indicating whether a window has been closed or not

window.closed

78. How will you explain closures in JavaScript? When are they used?

A closure is a function that retains access to its lexical scope even when executed outside of it. They are used for data privacy, callbacks, and function factories.

79. Which method Joins two or more strings, and returns a new joined string

str1.concat(str2, str3)

80. Which method joins two or more arrays, and returns a copy of the joined arrays

arr1.concat(arr2, arr3)

Back to Index
Previous JavaScript question answers 41-60 Interactive Quiz App Next
*
*