美文网首页
4. 输出打印

4. 输出打印

作者: 小草莓蹦蹦跳 | 来源:发表于2017-10-21 21:46 被阅读0次
      1. console.log('1+2+3');
      1. console.log(eval('1+2+3'));
      1. 下面的typeof分别返回什么?
      • typeof null

      • typeof isNaN

      • typeof []

      • typeof [1, 2]

      • typeof 'leipeng'

      • var i = true;
        alert(typeof i);
        alert(typeof 1);

      • var a;
        alert(typeof a);

      • function a(){;};
        alert(typeof a) ;

      • var box={};
        alert(typeof box);

      • var box={};
        alert(box);

      • var box =new Object();
        alert(box);

      • function king(){}
        alert(king);

      • var box="wjje";
        alert(typeof "wjje");
        alert(typeof box);


    答案:

    1.    1+2+3
    
    2.    6
    
    3.    object 、function、object 、object 、string、
    
    boolean   number、undefined、function、object、
    
    [object  object]、[object  object]、function  king(){}、string string、
    
    
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 
    
    3.    5 

    相关文章

      网友评论

          本文标题:4. 输出打印

          本文链接:https://www.haomeiwen.com/subject/unewuxtx.html