1. Question: What would be the value of 'ind' after execution of the following code?
    var msg="Welcome to ExpertRating"
    var ind= msg.substr(3, 3)

    A
    lco

    B
    com

    C
    ome

    D
    Welcome

    E
    None

    Note: Not available
    1. Report
  2. Question: What is the output of following JavaScript code?  
    <script type="text/javascript">   
     x=4+"4";
     document.write(x); 
    </script>

    A
    44

    B
    8

    C
    4

    D
    Error outpur

    Note: Not available
    1. Report
  3. Question: What is the output of following JavaScript code?
    <script type="text/javascript">  
      var text = "This is a text";  
      var result = text.split(" "); 
       document.write(result); 
    </script>

    A
    This is a text

    B
    This,is,a,text

    C
    This is a text

    D
    "This" "is" "a" "Text"

    Note: Not available
    1. Report
  4. Question: What is the output of following JavaScript code?  
    <script type="text/javascript">   
     var s= "Good 100%";  
     var pattern = /\D/g;   
     var output= s.match(pattern);  
     document.write(output); 
    </script>

    A
    100%

    B
    Good%

    C
    Good

    D
    G,o,o,d, ,%

    Note: Not available
    1. Report
  5. Question: What is the output of following JavaScript code?  
    <script type="text/javascript">   
    var text="This is a text";   
    alert(text.charAt(text.length-1));
     </script>

    A
    t

    B
    x

    C
    error

    D
    none

    Note: Not available
    1. Report
  6. Question: What is the output of following JavaScript code?
    <script type="text/javascript">   
    document.write(2+5+"8"); 
    </script>

    A
    78

    B
    15

    C
    258

    D
    error

    Note: Not available
    1. Report
  7. Question: What will produce the output of following JavaScript code?
    <script type="text/javascript">
    
      document.write(parseFloat(9+10));
    
    </script>

    A
    19

    B
    19.00

    C
    910

    D
    error

    Note: Not available
    1. Report
  8. Question: What output will produce for the following JavaScript code snippet?
    <script type="text/javascript">    
    var str=((45%2)==0)?"hello":"bye";  
     document.write(str); 
    </script>

    A
    bye

    B
    hello

    C
    error

    D
    0

    Note: ((45%2)==0) > 45%2 =1 > (1==0) > false Therefore, var str=((45%2)==0)?"hello":"bye";  > str = false ?"hello":"bye"; > str="bye"
    1. Report
  9. Question: What is the output of following JavaScript code?
    <script type="text/javascript">
       var cst = "Web Presence Solutions & Implementation";
       var pattern = new RegExp("Implementation","i");
       document.write(cst.match(pattern));
    </script>

    A
    null

    B
    Implementation

    C
    none

    D
    error

    Note: Not available
    1. Report
  10. Question: What is the output of following JavaScript code?
    <script type="text/javascript">
    
    function sum(x){
       function add(y){
         return x+y;
       }
       return add;
    }
    
    function callme(){
      result=sum(5)(5);
      alert(result);
    }
    
    callme();
    
    </script>

    A
    10

    B
    5

    C
    error

    D
    none

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