摘要: 一、为什么要写这篇文章 最近忙里偷闲学了一下vue.js,同时也复习了一下boostrap,发现这两种东西如果同时运用到一起,可以发挥很强大的作用,boostrap优雅的样式和丰富的组件使得页面开发变得更美观和更容易,同时vue.js又是可以绑定model和view(这个相当于MVC中的,M和V之间 阅读全文
posted @ 2017-02-17 17:33 FEDeveloper 阅读(1389) 评论(0) 推荐(0) 编辑
摘要: 函数声明和变量声明总是会被解释器悄悄地被“提升”到方法体的最顶部 请注意,变量赋值并没有被提升,只是声明被提升了。 函数的声明比变量的声明具有高的优先级。 下面的程序是什么结果? var foo = 1; function bar() { if (!foo) { var foo = 10; } al 阅读全文
posted @ 2017-02-17 13:58 FEDeveloper 阅读(700) 评论(0) 推荐(0) 编辑
摘要: 以下代码是否报错,如果不报错输出什么,为什么 var x = !!"Hello" + (!"world", !!"from here!!"); alert(x);不会报错,输出为2;原因:var x = !!"Hello" + (!"world", !!"from here!!");因为这三个字符串 阅读全文
posted @ 2017-02-17 11:52 FEDeveloper 阅读(259) 评论(0) 推荐(0) 编辑
摘要: var a = {n:1}; var b = a; a = {n:2}; a.x = a ;console.log(a.x);console.log(b.x); var a = {n:1}; var b = a; a.x = a = {n:2}; console.log(a.x);console.l 阅读全文
posted @ 2017-02-17 11:34 FEDeveloper 阅读(2820) 评论(0) 推荐(1) 编辑