What will be the output of the following JavaScript code? <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Math.sqrt(49); </script> a) ...
View Question
What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
document.getElementById(“demo”).innerHTML = Math.floor(4.7);
</script>
What will be the output of the following JavaScript code? <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Math.floor(4.7); </script> a) ...
View Question
What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
document.getElementById(“demo”).innerHTML = Math.min(0, 150, 30, 20, -8, -200);
</script>
What will be the output of the following JavaScript code? <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Math.min(0, 150, 30, 20, ...
View Question
What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
document.getElementById(“demo”).innerHTML = Math.abs(-4.5);
</script>
What will be the output of the following JavaScript code? <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Math.abs(-4.5); </script> a) ...
View Question
What will be the output of the following JavaScript code?
<p id=”demo”></p>
<script>
document.getElementById(“demo”).innerHTML = Math.sin(90 * Math.PI / 180);
</script>
What will be the output of the following JavaScript code? <p id="demo"></p> <script> document.getElementById("demo").innerHTML = Math.sin(90 * ...
View QuestionThe new Java arrays can be created into JavaScript programs using which of the following classes?
a) java.Array b) java.lang.* c) java.lang.Array d) java.lang.reflect.Array Answer: d Explanation: There is no natural JavaScript syntax ...
View QuestionThe JavaScript classes can be instantiated using _____ operator.
a) create b) new c) instantiate d) create.new Answer: b Explanation: New is a keyword in JavaScript which is ...
View QuestionWhat does Rhino do when the getter and setter methods exist?
a) It becomes JavaScript properties b) Java classes are used to avoid them c) Java classes & JavaScript properties
View Question
What will be the output of the following JavaScript code?
var f = new java.io.File(“/tmp/test”);
var out = new java.io.FileWriter(f);
out instanceof java.io.Reader
What will be the output of the following JavaScript code? var f = new java.io.File("/tmp/test"); var out = ...
View QuestionWhich is a more formal way of importing packages and classes as JavaScript objects?
a) import(java.util.*); b) importClass(java.util.*); c) import.Class(java.util.*); d) Class.import(java.util.*); Answer: b Explanation: Because packages ...
View Question