荣耀内推!
点赞 1 评论 3
全部评论
相关推荐
昨天 10:17
门头沟学院 Java 明天不下雨了:小林Coding:https://xiaolincoding.com/
全栈哥:https://www.pdai.tech/
Guide哥:https://javaguide.cn/
秀哥:https://interviewguide.cn/
沉默王二:https://javabetter.cn/home.html
磊哥:https://www.javacn.site/interview/basic/
小傅哥:https://bugstack.cn/
源码哥:https://doocs.github.io/source-code-hunter/#/
各大厂的公众号技术文章和一些经典的书籍
点赞 评论 收藏
分享
球球与墩墩:这不是前端常考的对象扁平化吗,面试官像是前端出来的
const flattern = (obj) => {
const res = {};
const dfs = (curr, path) => {
if(typeof curr === 'object' && curr !== null) {
const isArray = Array.isArray(curr);
for(let key in curr) {
const newPath = path ? isArray ? `${path}[${key}]` : `${path}.${key}` : key;
dfs(curr[key], newPath);
}
} else {
res[path] = curr
}
}
dfs(obj);
return res;
}
查看3道真题和解析 点赞 评论 收藏
分享
萨德楽陈:能进去你就是最牛逼的,不会学就完了 点赞 评论 收藏
分享
点赞 评论 收藏
分享