1. Question: What is the output of the following code?
    let a=2;
       let b=3;
       document.write(a**b);
    New

    A
    3

    B
    5

    C
    6

    D
    8

    Note: Not available
    1. Report
  2. Question: what is the output of the following code?
    const str = 'Mozilla';
    console.log(str.substring(1, 3));
    New

    A
    Mo

    B
    oz

    C
    zi

    D
    il

    Note: Not available
    1. Report
  3. Question: What is the output of the following code?
    let x=33.54;
    let data=x.toString();
    
    console.log(typeof data);
    New

    A
    number

    B
    object

    C
    string

    D
    Compile Error

    Note: Not available
    1. Report
  4. Question: what is the output of the following code?
    class ClassWithGetSet {
      #msg = "hello world";
      get msg() {
        return this.#msg;
      }
      set msg(x) {
        this.#msg = `hello ${x}`;
      }
    }
    
    const instance = new ClassWithGetSet();
    console.log(instance.msg); 
    
    instance.msg = "cake";
    console.log(instance.msg);
    New

    A
    hello world hello world

    B
    hello cake hello world

    C
    hello world hello cake

    D
    Compile Error

    Note: Not available
    1. Report
  5. Question: How to call parent method named print() from child class in the JavaScript? New

    A
    parent.print()

    B
    super.print()

    C
    this.print()

    D
    print()

    Note: Not available
    1. Report
  6. Question: which of the following code shows override method?
    class A {
      add(a,b){
        return a+b;
      }
      print() {
        console.log("class A");
      }
    }
    
    class B extends A {
    
      print() {
        console.log("class B");
      }
    
      sub(a,b){
        return a-b;
      }
      
      parentPrint() {
        super.print();
      }
    }
    New

    A
    print()

    B
    add()

    C
    parentPrint()

    D
    sub()

    Note: Not available
    1. Report
Copyright © 2024. Powered by Intellect Software Ltd