Web Technologies - Javascript

page 1 out of 4

page 1 out of 4


Question 1     

What does num store after this execution?

const num = parseInt('7*6', 10);






Question 2     

What will be printed when you click on the paragraph?

<div onclick="console.log('div')">
  <p onclick="console.log('p')">
    Click here!
  </p>
</div>





Question 3     

What is the event targeted when a button is clicked?

<div onclick="console.log('first div')">
  <div onclick="console.log('second div')">
    <button onclick="console.log('button')">
      Click!
    </button>
  </div>
</div>





Question 4     

What is the output of the following code?

function sum(a, b) {
  return a + b;
}

sum(1, '2');






Question 5     

What is the output of the following code?

let c = { greeting: 'Hey!' };
let d;

d = c;
c.greeting = 'Hello';
console.log(d.greeting);






Question 6     

Which of the following is true?

const bird = {
  size: 'small',
};

const mouse = {
  name: 'Mickey',
  small: true,
};





Question 7     

What is the output of the following code?

function sayHi() {
  console.log(name);
  console.log(age);
  var name = 'name';
  let age = 21;
}

sayHi();





Question 8     

What is the correct JavaScript syntax to change the content of the HTML element below?

<p id="demo">This is a demonstration.</p>





Question 9     

How can you find a client's browser name?






page 1 out of 4

page 1 out of 4


Sign Up Page

Oops!!

To view the solution need to Login



Score : 0 / 0
L
o
a
d
i
n
g
.
.
.