360一面 前端 秋招 面经

基本信息

时间:2023.10.23
时长:80 min
base:帝都
面试岗位:前端 秋招 

问题

  1. 自我介绍
  2. 微前端用的什么框架?
  3. qiankun如何隔离JS?
  4. web conponent用于css或者JS隔离有啥弊端?
  5. 为什么要做课程?
  6. 有针对框架做二开?
  7. 如何评价你讲述的框架?
  8. XSS CSRF都讲一下
  9. 我看你写了axios封装拦截重复请求,这个是怎么做的?
  10. 拦截之后,会有什么后续操作?
  11. 业务场景中有并发请求,两个组件都请求同一个接口,该如何降低服务端压力?
  12. 用axios如何添加一个拦截器?
  13. 如何学习前端的?
  14. 用过SpringBoot?
  15. 讲述一下SpringBoot核心概念
  16. 讲一下JVM调优
  17. 如何解决跨域?
  18. Nginx如何解决跨域?
  19. 伪元素了解吗?
  20. 前端JavaScript如何获取到伪元素?
        let computedStyle = window.getComputedStyle(element, ":before");
        let content = computedStyle.getPropertyValue("content");
        console.log(content);
  1. CSS盒模型
  2. flex布局介绍
  3. flex中设置主轴方向的属性是什么?
  4. align-content属性干嘛的?
  5. CSS的link和import的区别
  6. 选择器有哪些?
  7. 属性选择器的权重是?
  8. 同时写类选择器和属性选择器,谁优先?
  9. 父子元素,子元素如何垂直水平居中
  10. margin:auto可以居中的原理是?
  11. margin:auto可以纵向居中吗?
  12. 箭头函数和普通函数的区别
  13. 箭头函数有prototype吗?
  14. 箭头函数可以作为构造函数吗?
  15. 代码题1,看图说结果

alt

  1. 执行顺序是什么?

alt

  1. 补全代码

alt

  1. dom转为json

alt

我写的代码:

<!DOCTYPE html>
<html>
<head>
    <meta charset="UTF-8">
    <style>
        body {
            margin: 0;
            font-size: 14px;
        }
    </style>
    <title></title>
</head>
<body>
<div id="jsContainer">
    <ul class="js-test" id="jsParent">
        <li data-index="0">
            <div id="1111">222222222222222222222222</div>
        </li>
        <li data-index="1">2</li>
    </ul>
    <span style="font-weight: bold;">3</span>
    4
</div>
<script type="text/javascript">
    function dom2json() {
        const root = document.getElementById('jsContainer')
        const result = dfs(root)
        console.log(result)
        function dfs(root) {
            const result = {}
            result.tag = root.tagName
            const names = root.getAttributeNames()  // arr
            const attrs = {}
            for (const name of names) {
                attrs[name] = root.getAttribute(name)
            }
            result.attributes = {
                ...attrs
            }
            const arr = root.children 
            if (arr.length === 0) {
                result.content = root.innerText
            }
            const children = []
            for (const item of arr) {
                const temp = dfs(item)
                children.push(temp)
            }
            if (children.length) {
                result.children = children
            }
            return result
        }
    }
    dom2json()
</script>
</body>
</html>

总结

难度不高,但是属性值记不住,API也记不住。。最后共享屏幕然后用webstorm靠代码提示写出来的,有些API不知道,直接共享屏幕百度查API的

#前端##面经##秋招##360#
全部评论
tql
1
送花
回复
分享
发布于 2023-10-23 17:39 陕西
第四个有啥弊端网上咋搜不到
点赞
送花
回复
分享
发布于 2023-10-24 14:07 湖南
秋招专场
校招火热招聘中
官网直投

相关推荐

某物流公司 软件开发岗 总包26-30
点赞 评论 收藏
转发
7 21 评论
分享
牛客网
牛客企业服务