How many constant values can the type property be represented?
Which of the following are JavaScript logging libraries?
You can send data to a worker object using the _______ method.
If we want the scope visibility of Cookie to be localStorage then which of the following symbol will you use?
A child component can never send a prop back to the _____.
What does the <noscript> HTML tag do?
What does the type attribute of the navigation object being set to 2 indicate?
What will be the output of the following JavaScript code?
var grade='E';
var result;
switch(grade)
{
case 'A':
result+="10";
case 'B':
result+=" 9";
case 'C':
result+=" 8";
default:
result+=" 0";
}
document.write(result);
In this code,
<div id="demo">
<p id="p1">Para1</p>
<p id="p2">Para2</p>
</div>
<script>
var parent = document.getElementById("demo");
var child = document.getElementById("p1");
parent.removeChild(child); //This line
in place of the specified line, could we use
child.parentNode.removeChild(child);
Predict the output:
class Car {
constructor() {
this.sayBye = this.sayBye.bind(this);
}
sayHi() {
console.log(`Hello from ${this.name}`);
}
sayBye() {
console.log(`Bye from ${this.name}`);
}
get name() {
return 'Ferrari';
}
}
class Bird {
get name() {
return 'Tweety';
}
}
const car = new Car();
const bird = new Bird();
car.sayHi();
bird.sayHi = car.sayHi;
bird.sayHi();
bird.sayBye = car.sayBye;
bird.sayBye();