16). JavaScript Code can be called by using ___________

[A]RMI
[B]Triggering Event
[C]Preprocessor
[D]Function/Method

Show Answer

17). The type of a variable that is volatile is _______________

[A]Volatile variable
[B] Mutable variable
[C]Immutable variable
[D]Dynamic variable

Show Answer

18). A hexadecimal literal begins with __________

[A] 00
[B]0x
[C]0X
[D]Both 0x and 0X

Show Answer

19). The generalised syntax for a real number representation is __________

[A][digits][.digits][(E|e)[(+|-)]digits]
[B][digits][+digits][(E|e)[(+|-)]digits]
[C][digits][(E|e)[(+|-)]digits]
[D][.digits][digits][(E|e)[(+|-)]digits]

Show Answer

20). JavaScript _________ when there is an indefinite or an infinite value during an arithmetic computation.

[A]Prints an exception error
[B]Prints an overflow error
[C]Displays “Infinity”
[D]Prints the value as such

Show Answer

21). Which of the following is not considered as an error in JavaScript?

[A]Syntax error
[B]Missing of semicolons
[C]Division by zero
[D] Missing of Bracket

Show Answer

22). The escape sequence ‘\f’ stands for _________

[A]Floating numbers
[B]Representation of functions that returns a value
[C]\f is not present in JavaScript
[D] Form feed

Show Answer

23). The snippet that has to be used to check if “a” is not equal to “null” is _________

[A] if(a!=null)
[B]if (!a)
[C] if(a!null)
[D]if(a!==null)

Show Answer

24). The statement a===b refers to _________

[A]Both a and b are equal in value, type and reference address
[B]Both a and b are equal in value
[C]Both a and b are equal in value and type
[D]There is no such statement

Show Answer

25). Assume that we have to convert “false” that is a non-string to string. The command that we use is (without invoking the “new” operator).

[A]false.toString()
[B]String(false)
[C]String newvariable=”false”
[D] Both false.toString() and String(false)

Show Answer

26). What will be the output of the following JavaScript code?
function compare()
{
    int num=2;
    char b=2;
    if(a==b)
        return true;
    else
        return false;
}

[A]true
[B]false
[C]runtime error
[D]compilation error

Show Answer

27). What will be the output of the following JavaScript code?
function equalto()
{
    let num=10;
    if(num===”10”)
        return true;
    else
        return false;
}

[A]true
[B]false
[C]runtime error
[D]compilation error

Show Answer

28). What will be the output of the following JavaScript code?
function compare()
{
    int a=1;
    char b=1;
    if(a.tostring()===b)
        return true;
    else 
        return false;
}

[A]true
[B]false
[C] runtime error
[D]logical error

Show Answer

29). What will be the output of the following JavaScript code?
int a==2;
int b=4;
int ans=a+b;
print(ans);

[A]2
[B]6
[C]0
[D]error

Show Answer

30). What will be the output of the following JavaScript code?
int a=1;
if(a!=null)
    return 1;
else
    return 0;

[A]1
[B]0
[C] runtime error
[D]compiler error

Show Answer