网易2020校招笔试- 前端开发工程师(提前批)
时长:120分钟 总分:100分
143浏览 0人已完成答题
题型介绍
题型 | 单选题 | 填空题 | 简答题 |
---|---|---|---|
数量 | 10 | 4 | 2 |
有一类二叉树用三叉链表来存储的时候除了带有指向左右孩子节点的两个指针,还有...
判断一个数组或序列是正序,倒序还是乱序,需要我们将这个数组完整的遍历一遍通...
序列交换
序列维护
每次操作有一个查询的数字x,小易需要将序列数据中所有大于等于x的数字都减一,并输出在本次操作中有多少个数字被减一了。
小易犯了难,希望你能帮帮他。
最大公约数
下面代码的输出是: const arr = ...
const arr = [] const testObj = {} console.log(arr === "") console.log(arr == "") arr.toString = () => 1 console.log(arr === 1) console.log(arr == 1) arr.valueOf = () => 2 console.log(arr == 2) arr.valueOf = () => testObj console.log(arr == testObj)
下面代码的输出是: let a = 0 const obj = { ...
let a = 0 const obj = { a: 1, b: function() { console.log(this.a) } } const obj1 = { a: 2 } const fun = obj.b fun() fun.apply(obj) fun.bind(obj1).apply(obj) const fun1 = fun.bind(obj1) new fun()
下面代码的输出是: function func() {...
function func() { this.name = "Hellen" } console.log(typeof func.prototype) func.prototype.getName = function() { console.log(this.name) } const Obj = {} Obj.__proto__ = func.prototype func.call(Obj) if (Obj.getName) { console.log("yes") Obj.getName() } console.log("end")
下面代码的输出是: function func(source) {&nb...
function func(source) { var target = {} for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { if (typeof source[key] === 'object') { target[key] = func(source[key]) } else { target[key] = source[key] } } } return target } var a = { a1: "a1", a2: { b1: "b1", b2: "b2" }, a3: undefined, a4: null, a5: 1 } var b = func(a) console.log(b)
<canvas width="250" height="250"&g...
下列布局在页面上的宽度比是多少? // css .fl...
<div class="left"></div>
<div class="right"></div>
</div>
如下图所示,请实现如下功能,当鼠标移到黑底客户服务区块后,出来白底卡片内容...
要求实现该功能完整的html、css及js代码
参考:三角形图标的样式为 trangle-down如下:
.triangle-down{ width:0; height:0; border-left:5pxsolidtransparent; border-right:5pxsolidtransparent border-top:5pxsolidblack }
设计一个uniqueify函数,可以根据用户自定义的 重复判定规...
//情况一: letarr0 = [1,1,1,0,5,6] uniqueify(arr0) //输出:[1,0,5,6] //情况二: letarr1 = [ {id: 1, name:'xx'}, {id: 1, name:'xx'}, {id: 2, name:'xx'}, {id: 1, name:'xx'}, {id: 1, name:'xx'} ] uniqueify(arr1, a=>a.id)//假如这里的去重规则依据为id //输出: [ {id: 1, name:'xx'}, {id: 2, name:'xx'} ] //情况三: letarr2 = [ {name:'xx',sex:'male'}, {name:'xx',sex:'female'}, {name:'xx',sex:'male'}, {name:'aa',sex:'male'}, {name:'aa',sex:'male'} ] uniqueify(arr2, a=>(a.name+a.sex))//假如这里的去重规则依据为名字和性别均相同,才算是相同 //输出: [ {name:'xx',sex:'male'}, {name:'xx',sex:'female'}, {name:'aa',sex:'male'} ]