advanced-frontend / just-now-qa Goto Github PK
View Code? Open in Web Editor NEW社群百问百答
社群百问百答
自己是中途学前端的,到现在也有四年了,但是今年30岁了。总的来说,技术成长慢,知识不够系统化,是我最大的缺陷。也很迷茫,目前想往数据可视化方向走,但是又苦于东西难啃。心累。
针对下面这段代码的输出,着实不解。来自于《你不知道的 js》中卷的第 191 页
var p3 = new Promise(function (resolve, reject) {
resolve("B");
})
var p1 = new Promise(function (resolve, reject) {
resolve(p3);
})
var p2 = new Promise(function (resolve, reject) {
resolve("A");
})
p1.then(v => console.log(v));
p2.then(v => console.log(v));
我在看Vue2.x源码的时候,发现文件是js文件,但是里面出现了:数据类型
这种写法,我不是很懂,希望老师能讲解一下。
文件 src/core/vdom/create-element.js
export function createElement (
context: Component,
tag: any,
data: any,
children: any,
normalizationType: any,
alwaysNormalize: boolean
): VNode | Array<VNode> {
if (Array.isArray(data) || isPrimitive(data)) {
normalizationType = children
children = data
data = undefined
}
if (isTrue(alwaysNormalize)) {
normalizationType = ALWAYS_NORMALIZE
}
return _createElement(context, tag, data, children, normalizationType)
}
我没有见过这种写法,这种写法为什么不会报错?为什么要这样写?
如题,想问一下JavaScript中上下文和作用域的区别
如题
如何更简洁明了的回答并描述Vue响应式原理
vue3.0使用vue-seamless-scroll插件报错,就是正常的下载vue-seamless-scroll插件,之后在 main.js里面引入,在要用的页面引这个插件,components注册一下,但是用的时候 报错vue-seamless-scroll.min.js?a939:1 Uncaught (in promise) TypeError: Cannot read properties of undefined (reading '_c') 不知道什么情况 请教大佬解答一下
每天晚上8点下班,回到家差不多9点半了,因为是刚入行前端,感觉不知道从哪里入手提升自己,所以干脆什么都不做了。虽然**上很想看书或继续写代码,但身体就是动不起来,坐在电脑前,随便刷刷微博、B站就11点了。我也知道这样不行,能否给一点建议,我也想跳到大厂去。
爬虫的话, 用哪些技术或者框架?
看了微信公众号的一些大厂面试题,感觉面试到最后都需要考算法,真的是这样吗?那么我应该怎么学习算法呢?找了很多书,几乎都是C语言或者java的算法书籍,没有JS相关的算法书,那我需要另外学习C或者java吗?算法学习到什么程度就可以应付面试了呢?
let a=1.123456789987654321;
需要将a转变成字符串(“1.123456789987654321”),切精度不丢失,怎么搞?
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.