leigh-p / bingyan-test Goto Github PK
View Code? Open in Web Editor NEW冰岩实习任务
冰岩实习任务
能用 markdown 写 Readme 了,值得肯定
爬取了数据还是不错的,看得出下了功夫
对模块化有了一定认识和了解了
git log 有了规范性尝试,这个真的不错!希望继续保持,详细的规范建议是参考社区规范(比如某些开源库的写法)
先补充一下昨天忘记了的几点
首先你如果用不同的浏览器(包含手机)开发会发现页面初始的样式是不一样的,这时候我们应当对 css 进行一次初始化,google 搜索关键词: css reset, normalize.css
依然代码规范的问题,制表符一定要 2 空格!制表符一定要两空格!制表符一定要两空格!
像body>div
这样的父子选择器,建议中间用空格 body > div
js 文件用到了 commonjs 规范,这个你会发现浏览器运行不了的,这是社区规范,详情可以看 阮老师的博客 以及 seajs 作者谈模块化 等,模块化是前端工程化非常重要的一部分!
js 里面 require 的一些包,建议先使用原生 js 开发以了解刀耕火种的开发方式同时也能方便后面的框架和库的学习与使用
捕捉到的数据,其实那个 status 对于爬数据的时候其实不重要,这个是后端返回前端的一个状态码而已,暂时不用管
爬取到数据的方式或路程建议记录下来,代码也好,工具也罢都可以记录到 Readme 中
了解前端工程化(只做了解),重点是理解前端模块化,
上面的一条可能目前比较远,所以重点还是 js 的基础,一定要把原生 js 的基础打牢
可以尝试 google 关键词:nodejs,commonjs,amd,cmd,es6 modules,http 以及 前后端分离
总体而言,今天学到的绝不会无用,爱上这个自学的过程!
总体可以的,加强点 js 就是了~
undefined
undefined
undefined
总的来说,希望把之前的代码重构下,之前提到过的问题应当及时调整
看到有 commit 原型链和继承,看的出对 js 有下很大功夫,表扬一下。
思考题
(之前准备的面试题)请实现以下的 extends 函数并思考为什么 es6 的 class 是语法糖~
function A(name, age) {
this.name = name
this.age = age
}
A.prototype.sayHi() {
console.log(`Hello! I'm ${this.name} and ${this.age} years old.`)
}
/*
* extends one class from another one class
* @param {function} contructor
* @param {object} methods set
* @return {object} instance
*/
const B = extends(A, {
sing() {
console.log(`${this.name} is singing`)
},
dance() {
console.log(`${this.name} is dancing`)
}
})
const instanceB = new B('Mondo', 21)
instanceB.sayHi() // Hello! I'm Mondo and 21 years old.
instanceB.sing() // Mondo is singing
instanceB.dance() // Mondo is dancing
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.