System.out.println("Hello Word")
println ("Hello Word")
document.write("Hello Word")
response.write("Hello Word")
insertBefore()
insertPrevious()
appendBefore()
addBefore()
element.innerHTML
element.value
element.content
element.innerText
5myvalue
myvalue5
Myvalue
None of These
oninput
onchange
onedit
onupdate
onload
DOMContentLoaded
onstart
oninit
element.getValue()
=
x
==
*
alert("Hello World")
alertBox("Hello World")
msgBox("Hello World")
msg("Hello World")
<!--This is a comment-->
//This is a comment
'This is a comment
#This is a comment
element.background = "red";
element.style.backgroundColor = "red";
element.style.background = "red";
element.css.backgroundColor = "red";
To style HTML Pages
To perform server-side scripting operation
To execute query related to DB on server
To add interactivity to HTML Pages
push()
pop()
shift()
unshift()
===
!=
JavaScript must always be placed inside the <head> tag
JavaScript can be placed either in the <head> or <body> tag
JavaScript can only be placed in external files
JavaScript cannot be placed in the <head> tag
<script name="data.js">
<script href="data.js">
<script src="data.js">
<link href="data.js">
onsubmit
onreset
remove()
delete()
Boolean
String
Number
Function
var defines a variable while let defines a constant.
There is no such major difference between them.
The value of a variable declared with var can be changed while the value of a variable declared with let cannot be changed.
var defined function scoped variable while let define block scoped variable.
Null type
Undefined type
Number type
All of the mentioned
insertAfter()
appendChild()
prependChild()
Division by zero
Missing of semicolons
Syntax error
Both A and B
/* This is a comment */
Both A and C
getElementByTagName()
getElementById()
getElementByClass()
querySelector()
Prints an exception error
Prints an overflow error
Displays “Infinity”
Prints the value as such
innerHTML
outerHTML
textContent
value
<script src=" test.js"'></script>
<script href=" test.js"></script>
<import src=" test.js"></import>
<script link=" test.js"></script>
document.createElement()
document.appendElement()
document.insertElement()
document.newElement()
integers
double precision floating point
double
floating point
replaceNode()
replaceElement()
replaceChild()
replaceWith()
To Perform Server Side Scripting Opertion
To Execute Query Related to DB on Server
To Style HTML Pages
if(a!=null)
if (!a)
if(a!null)
if(a!==null)
.html
.java
.js
.css
It is triggered when an element is clicked
It is triggered when an element gains focus
It is triggered when an element is hovered
It is triggered when the window is resized
<javascript>
<script>
<scripting>
<link>
onmove
onscroll
onresize
onblur fires when an element loses focus, and onfocus fires when an element gains focus
Both events fire when the window is minimized
Both events trigger when the page is loaded
onblur fires when an element is clicked, and onfocus fires when the mouse moves over an element
jscript.write("Sky is blue")
document.write("Sky is blue")
print("Sky is blue")
jscript.print("Sky is blue")
element.addEventListener("click", function);
element.addEventHandler("click", function);
element.attach("click", function);
element.on("click", function);
innerText
All of the above
alert("Hello World");
msgBox("Hello World");
alertBox("Hello World");
msg("Hello World");
document. write()
console.log()
document.getElementById()
Displays a message in an alert box
Prints output to the console
Writes data to a file
Logs an error in the browser console
element.appendChild()
element.insertChild()
element.addChild()
element.attachChild()
onclick
onmouseover
onmousehover
onmouseclick
document.getElementByTagName()
document.getElementsByTagName()
document.querySelectorAll()
document.tagName()
oncontextmenu
onmousedown
onrightclick
onselect
removeElement()
removeNode()
removeChild()
deleteNode()
variable carName;
var carName;
vari carName;
dim carName;