【建议】记录一次BAT一线互联网公司前端JavaScript面试
前沿 置身世外只为暗中观察!!!Hello大家好,我是魔王哪吒! 面试内容 你需要一些HTML和css的基础知识,掌握JavaScript和ES6的基本语法,对事物的好奇心。 初级JS面试题 JS Web API,开发环境,运行环境 原型,作用域,异步,Ajax,事件,webpack等 观察所有面试题的考点 学习梳理知识体系图 找准知识体系,刻意掌握 善于总结观点,原理 typeof能判断哪些类型 typeof运算符: 可以识别所有值的类型 可以识别函数 可以用力判断是否为引用类型 考点:JS变量类型 代码: // 判断所有值的类型 let a; typeof a // 'undefined' const str = 'abc'; typeof str // 'string' const n = 10; typeof n // 'number' const b = true; typeof b // 'boolean' const s = Symbol('s'); typeof s // 'symbol' // 能够判断函数 typeof console.log // 'function' typeof function(){} // 'function' // 能够识别引用类型 typeof null // 'object' typeof ['a','b'] // 'object