1. Question: Which of following JavaScript version is introduced strict equality(===) and strict inequality(!==) operators ?

    A
    JavaScript 1.1

    B
    JavaScript 1.2

    C
    JavaScript 1.3

    D
    JavaScript 1.4

    Note: If you had an application where both the value and the type of data are important to compare, you could not make that comparison with standard comparison operators.To fix this problem JavaScript introduced this operator
    1. Report
  2. Question: What will be output for the following JavaScript:
    <script>
    var a=5
    var b=4
    var c=(a>b)
    var d="Your stock is worth "+(c*20)+" thousand dollars.";
    alert(d);
    </script>

    A
    Your stock is worth 20 thousand dollars.

    B
    Your stock is worth 0 thousand dollars.

    C
    No output

    D
    Syntax error

    Note: Not available
    1. Report
  3. Question: What will be output for the following javascript code fragment:
    var wrong=(6==5)
    document.write(wrong);

    A
    false

    B
    true

    C
    wrong

    D
    syntax error

    Note: Not available
    1. Report
  4. Question: What will produce output for the following javascript code fragment:
    <script>
    var alpha=20
    var beta=25
    var zeta=(alpha<=beta);
    if(zeta){
    	var sigma="This is true";
    }else{
    	var sigma="This is not true";
    }
    document.write(sigma);
    </script>

    A
    This is true

    B
    This is not true

    C
    Syntax error

    D
    sigma

    Note: Not available
    1. Report
  5. Question: What will be the output for the following javascript code fragment:
    <script>
    var currentWord="75";
    var currentNumber=75;
    var outcome=(currentWord==currentNumber);
    document.write(outcome);
    </script>

    A
    true

    B
    false

    C
    75

    D
    150

    Note: Not available
    1. Report
  6. Question: What will produce the following javascript code fragments:
    <script>
    var posNum=30;
    var negNum=-posNum
    var outcome=Math.abs(negNum);
    document.write(outcome);
    </script>

    A
    30

    B
    -30

    C
    true

    D
    syntax error

    Note: Not available
    1. Report
  7. Question: What will produce for the following javascript code:
    <script>
    var posVal=41;
    var negVal=-posVal;
    var diffVal=(posVal-negVal);
    document.write(diffVal);
    </script>

    A
    82

    B
    -82

    C
    41

    D
    Syntax error

    Note: Not available
    1. Report
  8. Question: What will produce for the following javascript code:
    <script>
    var stringNum="4";
    var stringNum2="20";
    var mulEm=stringNum*stringNum2;
    document.write(mulEm);
    </script>

    A
    80

    B
    420

    C
    Syntax Error

    D
    no output

    Note: Not available
    1. Report
  9. Question: What will produce for the following JavaScript code:
    <script>
    var stringNum="4";
    var stringNum2="20";
    var mulEm=stringNum+stringNum2;
    document.write(mulEm);
    </script>

    A
    24

    B
    420

    C
    Syntax Error

    D
    None

    Note: Not available
    1. Report
  10. Question: What will render output for the following JavaScript code:
    var a=0;
    var b=0
    document.write(a/b)

    A
    NaN

    B
    Infinity

    C
    0

    D
    Undefined

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