Html miscellaneous


  1. Typeof “infinity” will return ___________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    The typeof “infinity” will return number. E.g. typeof Infinity; // it will return “number”, when we divide any number by zero it will generate infinity.


  1. The integers in JavaScript are precise up to ___________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: B

    The integers in JavaScript have accuracy up to 15 digits. E.g. var y=111111111111111; // value of y will be 111111111111111. For decimal the maximum number of decimals is 17.



  1. JavaScript numbers are stored as ______________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: C

    The numbers according to international IEEE 754 standard are stored as a double precision floating point. It stores the numbers in 64-bit format, stored in bits from 0 to 51, exponent in bits is from 52 to 62 and signs in a bit is 63.


  1. For converting string to array we can use ______________ method.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: A

    For converting any string to an array we use split() method. E.g. var tr=”t,o,I,k,l”; tr.split(“,”); tr.split(“|”); tr.split(“ ”); charAt returns a character from the given index, charCodeAt() returns Unicode of character at the given index. toLowerCase() method converts input string into lower case string.



  1. Negative positions for string do not work in ______________.











  1. View Hint View Answer Discuss in Forum

    NA

    Correct Option: D

    While using slice(), substr() and substring() method we pass numbers as parameters respective to the string. E.g var tes= str.slice(-10). -10 is indicates negative position. It does not work in Internet Explorer or older versions.