阿里15年前端实习笔试-自己尝试做的答案

阿里15年前端实习笔试   http://www.cnblogs.com/dongtianee/p/4571170.html
1、答案D
考察变量提升
2、答案B
null NaN undefined区别  http://www.jb51.net/article/35404.htm
3、答案B
考察变量提升
4、答案ABCD
考察ECMAScript新特性
A解构赋值
Bconst
C模板对象
D新的数据构造对象map
5、答案AD
6、答案ABCD
无内容元素不需要闭合
8、
<! DOCTYPE html>
< html >

    < head >
         < meta charset = "UTF-8" >
         < title ></ title >
    </ head >
    < style >
          .aa {
              display : inline-block ;
              width : 20 px ;
              height : 20 px ;
              background : #fff ;
              box-shadow : 0 0 0 6 px #a5a5a5 ;
              border-bottom : 60 px solid #fff ;
              border-top : 20 px solid #fff ;
              border-left : 140 px solid #fff ;
              border-right : 20 px solid #fff ;
              position : relative ;
          }
         
          .aa : before {
              position : absolute ;
              content : " " ;
              display : block ;
              border-bottom : 60 px solid #a5a5a5 ;
              border-left : 40 px solid transparent ;
              border-right : 60 px solid transparent ;
              left : -130 px ;
          }
         
          .aa : after {
              position : absolute ;
              content : " " ;
              display : block ;
              border-bottom : 50 px solid #a5a5a5 ;
              border-left : 40 px solid transparent ;
              border-right : 60 px solid transparent ;
              left : -90 px ;
              top : 10 px ;
          }
         
          .circle {
              width : 25 px ;
              height : 25 px ;
              border-radius : 50 % ;
              background : #a5a5a5 ;
              display : block ;
          }
     </ style >

    < body >
         < div >< i class = "aa" >< i class = "circle" ></ i ></ i >
         </ div >
    </ body >

</ html >
考察transparent ::before  ::after伪元素
9、不会
优化
10、
function fn ( input ) {
                  input = parseInt( input , 10 );
                  return isPrime( input ) ? alert( "is prime" ) : alert( "not prime" );
             }

              function isPrime ( input ) {
                  var a = 0
                  for ( var i = 2 ; i < input ; i ++ )
                       if ( input % i == 0 ) {
                          a ++ ;
                      } //alert("0");
                  if (a == 0 ) return true ;
                  else return false ;
             }
             fn( 11 );
parseInt   函数可解析一个字符串,并返回一个整数。
判断质数
11、题目都没怎么看懂
12、考察设置、获取、删除cookie
没怎么看懂
13、
考察z-index 如果两个元素重合,z-index高者会遮挡低者






评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值