最近想把自己看书过程中的收获做一个纪录,希望对自己的学习也是一个督促。
peterzhanghui / blog Goto Github PK
View Code? Open in Web Editor NEW最近想把自己看书:books: 过程中的收获做一个纪录:bookmark:,希望对自己的学习也是一个督促。
最近想把自己看书:books: 过程中的收获做一个纪录:bookmark:,希望对自己的学习也是一个督促。
最近想把自己看书过程中的收获做一个纪录,希望对自己的学习也是一个督促。
一、占位符
对于字符串拼接,经常使用‘+’
var baseUrl = 'www.google.com' var a = 1, b = 'request', c = true var finalUrl = baseUrl + '?a=' + a + '&b=' + b + '&c=' + c
原作使用占位符${},可以更优雅
`const finalUrl = ${baseUrl}?a=${a}&b=${b}&c=${c}/
这本书网上好像评价挺高的,但是买来之后发现里面写到的技术多少还是挺老的,所以不建议入手。
1、页面跳转中,a->b->a->b 这样反复跳转会失效。
a、如果使用 navigator 需要添加open-type="navigateBack"
b、如果js控制使用
wx.navigateBack({ delta: 1 })
1、减少全局变量的引用,如document的引用,必须遍历整个作用域链,影响性能,如果超过一次,建议全局变量的引用存储到一个局部变量中。
2、循环
a、时间复杂度为O(n)时着重减少循环的执行量,时间复杂度大于O(n)时着重减少循环执行次数
b、以for循环为例,其他循环类似,尽量减少使用for in 对对象属性的循环,每次迭代会搜索实例或原型属性。
for(var i = a.length; i--; ) {
console.log(a[i])
}
c、迭代次数大于1000可以考虑达夫循环
很多内容都是基于java讲的,感觉不太适合纯前端看吧。
算是前端往全栈发展的一本入门指导教程,与我而言感觉很不错。
另外书中穿插了一些工作中沟通方面的软技能,一些技巧感觉很实用
第一章、作用域,神奇的闭包。
这本书自己看的比较快,之前看了一点,兴趣不是太高,就搁置了,知道前两天晚上再次看到,就像善始善终,把他看完,也算对得起花的那点软妹币。
说实话整本书看下来还是有收获的,就是浏览器在解析css样式表的时候,对选择器的解析顺序是right-to-left,和我们的阅读习惯刚好相反,所以样式书写的时候,要使用具体的类名,尽量不用元素选择器,后代选择器。
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.