-
Notifications
You must be signed in to change notification settings - Fork 0
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
interview #2
Comments
原文地址: 码云网页简历:简历模板-1 |
我的问题: |
// 数组去重:
// 1.利用Object 的键不重复
var obj = {};
var arr = [1,1,2,2,4,5,6,5];
var newArr = [];
var temp = 0;
for (var i = 0, len = arr.length; i < len; i++) {
temp = arr[i];
if (!obj[temp]) {
obj[temp] = temp;
}
}
Object.keys(obj).forEach(function(key,value, arr) {
newArr.push(obj[key]);
});
console.log('arr:', newArr); // [1,2,4,5,6]
// 方法2: 利用Set集合元素不可重复的特性
var newArr = new Set(arr); |
跨域的相关文章:
跨域资源共享 CORS 详解-阮一峰 |
点击穿透的问题: 第三方的库:github 源码:fastclick |
collection: |
js 中的数据类型: |
1.从发起请求到浏览器的显示页面发生的过程 |
Chrome浏览器下如何设置小于12px的字体?
存在的问题:
|
一些常见的面试题:
The text was updated successfully, but these errors were encountered: