Git Product home page Git Product logo

blog's Introduction

最近想把自己看书过程中的收获做一个纪录,希望对自己的学习也是一个督促。

blog's People

Contributors

peterzhanghui avatar

Watchers

James Cloos avatar  avatar

blog's Issues

js

一、占位符
对于字符串拼接,经常使用‘+’
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 })

《高性能JavaScript》

1、减少全局变量的引用,如document的引用,必须遍历整个作用域链,影响性能,如果超过一次,建议全局变量的引用存储到一个局部变量中。

2、循环
a、时间复杂度为O(n)时着重减少循环的执行量,时间复杂度大于O(n)时着重减少循环执行次数
b、以for循环为例,其他循环类似,尽量减少使用for in 对对象属性的循环,每次迭代会搜索实例或原型属性。

for(var i = a.length; i--; ) {
	console.log(a[i])
}

c、迭代次数大于1000可以考虑达夫循环

《Web全栈工程师的自我修养》

算是前端往全栈发展的一本入门指导教程,与我而言感觉很不错。
另外书中穿插了一些工作中沟通方面的软技能,一些技巧感觉很实用

《高性能网站建设进阶指南》

这本书自己看的比较快,之前看了一点,兴趣不是太高,就搁置了,知道前两天晚上再次看到,就像善始善终,把他看完,也算对得起花的那点软妹币。

说实话整本书看下来还是有收获的,就是浏览器在解析css样式表的时候,对选择器的解析顺序是right-to-left,和我们的阅读习惯刚好相反,所以样式书写的时候,要使用具体的类名,尽量不用元素选择器,后代选择器。

面试题

  1. 对象数组根据属性去重,并排序

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.