首页 > 【腾讯前端】暑期实习二面
头像
没有了🍒的丸子
编辑于 2020-05-05 08:54
+ 关注

【腾讯前端】暑期实习二面

休息了两天,来更一波二面面经,见https://www.nowcoder.com/discuss/419172

先说结论,个人感觉二面有点翻车,主要是有些很熟悉的知识点但是没讲好,一面之后很确定一定可以迎来二面,但是二面之后心里没底。

面试时间:2020年4月30日10:00 AM

面试方式:腾讯会议视频面试

主要内容:基础知识(和一面有重叠)、项目细节、代码、学习方式、期望城市、个人性格

过程:

自我介绍之后,问学习方式,在此埋下翻车的种子🤣学习方式嘴贱提了一嘴看过JavaScript设计模式书籍,结果第一个问题就是设计模式,结果直接懵逼,说实话设计模式看过真的只是看过,没啥感觉所以第一个问题直接翻车。

基础知识部分和一面不同的部分有细究原型、原型链、继承问题。包括不通继承实现方式、不通继承方式存在的问题等(翻车)。CSS细究全局居中实现方式涉及知识基础。Promise特点,给了几个例子问结果。箭头函数和function比较。强缓存协商缓存细节。跨域攻击细节。js精度问题(0.1+0.2==0.3的问题)

代码让实现了1几种继承、2随便写个排序算法(我写的冒泡排序,本来准备写插入排序,结果脑壳一抽当时没写出来)、
//3写了个类型判断函数

function getType(param) {
    const type = Object.prototype.toString.call(param).slice(8, -1);
    if (type === "Object") {
        return param.constructor.name;
    } else {
        return type;
    }
}

//4遍历根结点下所有子节点

function traverseDom(root) {
    let result = [];
    let queue = [root];
    while (queue.length) {
        let cur = queue.shift();
        result.push(cur);
        for (let i = 0; i < cur.children.length; i++) {
            queue.push(cur.children[i]);
        }
    }
    return result;
}

5实现页脚在内容最底部
这个问题描述如下图

<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <style>
        * {
            margin: 0;
        }
        
        html,
        body {
            height: 100%;
        }
        
        .container {
            min-height: 100%;
        }
        
        .content {
            background: goldenrod;
            color: white;
            text-align: center;
        }
        
        .placeholder {
            height: 50px;
        }
        
        .footer {
            height: 50px;
            background: greenyellow;
            margin-top: -50px;
        }
    </style>
</head>

<body>
    <div class="container">
        <div class="content">我是内容</div>
        <div class="placeholder"></div>
    </div>
    <div class="footer"></div>
</body>

</html>

更多模拟面试

全部评论

(3) 回帖
加载中...
话题 回帖

相关热帖

历年真题 真题热练榜 24小时
技术(软件)/信息技术类
查看全部

近期精华帖

热门推荐