sunflower


  • Home

  • Categories

  • About

  • Archives

  • Tags

JS instanceof 的本质

Posted on 2018/02/17 | In JavaScript
JS 之父原本是 Scheme 程序员,在接到设计一门 123456function Person (name) { this.name = name}const p = new Person("lgy")console.log(p instanceof Person) / ...
Read more »

Untitled

Posted on 2018/01/11
JavaScript 面向对象1234function Person (name, age) { this.name = name this.age = age} 当我们 const person = new Person("lgy", 30) 的时候,到 ...
Read more »

lodash 使用交流 v4.17.4

Posted on 2017/09/06

329上函数 (lodash 上统计的数)

Array: 65

1
["chunk", "compact", "concat", "difference", "differenceBy", "differenceWith", "drop", "dropRight", "dropRightWhile", "dropWhile", "fill", "findIndex", "findLastIndex", "first", "flatten", "flattenDeep", "flattenDepth", "fromPairs", "head", "indexOf", "initial", "intersection", "intersectionBy", "intersectionWith", "join", "last", "lastIndexOf", "nth", "pull", "pullAll", "pullAllBy", "pullAllWith", "pullAt", "remove", "reverse", "slice", "sortedIndex", "sortedIndexBy", "sortedIndexOf", "sortedLastIndex", "sortedLastIndexBy", "sortedLastIndexOf", "sortedUniq", "sortedUniqBy", "tail", "take", "takeRight", "takeRightWhile", "takeWhile", "union", "unionBy", "unionWith", "uniq", "uniqBy", "uniqWith", "unzip", "unzipWith", "without", "xor", "xorBy", "xorWith", "zip", "zipObject", "zipObjectDeep", "zipWith"]

Collection: 28

1
["countBy", "each", "eachRight", "every", "filter", "find", "findLast", "flatMap", "flatMapDeep", "flatMapDepth", "forEach", "forEachRight", "groupBy", "includes", "invokeMap", "keyBy", "map", "orderBy", "partition", "reduce", "reduceRight", "reject", "sample", "sampleSize", "shuffle", "size", "some", "sortBy"]

Date: 1

1
["now"]
Read more »

(译)鼠标移动事件(mouseover/out, mouseenter/leave)

Posted on 2017/09/03

原文链接: https://javascript.info/mousemove-mouseover-mouseout-mouseenter-mouseleave#tasks

当鼠标在DOM元素之间移动时, 会产生相应的鼠标事件. 现在让我们一起深入研究一下这些事件的细节.

Mouseover/mouseout, relatedTarget

当鼠标移动到一个元素上面时, 产生 mouseover 事件; 当它离开元素时, 产生 mouseout 事件.

mouseover-mouseout

Read more »

JavaScript Standard Style

Posted on 2017/07/10

JavaScript Standard Style

  • 使用两个空格进行缩进。

    eslint: indent

    1
    2
    3
    function hello (name) {
      console.log('hi', name)
    }
  • 除需要转义的情况外,字符串统一使用单引号。

    对于字符串构造的html,html属性优先使用双引号,而外围使用单引号。

    eslint: quotes

    1
    2
    console.log('hello there')
    $('<div class="box" />')
  • 不要定义未使用的变量。

    eslint: no-unused-vars

    1
    2
    3
    function myFunction () {
      var result = something()   // ✗ avoid 
    }
Read more »
王云甫 & 金卫娜 & 李光耀

王云甫 & 金卫娜 & 李光耀

GZQ Official Team

5 posts
1 categories
4 tags
© 2018 王云甫 & 金卫娜 & 李光耀
Powered by Hexo
Theme - NexT.Pisces