Code Monkey home page Code Monkey logo

Comments (9)

susan-github avatar susan-github commented on May 25, 2024 4

肿么感觉,看着糟糕代码都是我会写的,心好累

from blog.

iamcc avatar iamcc commented on May 25, 2024

第一个例子是不是有误?
元音开头的单词ENDING是way

from blog.

SeanKChan avatar SeanKChan commented on May 25, 2024

我也是这种感觉,槽糕的代码都是我现在在写的

from blog.

flyinhigh avatar flyinhigh commented on May 25, 2024

#${(Math.random() * 0xFFFFFF << 0).toString(16)};前面的`#$ 是啥意思,只有我觉得这是很装逼的写法吗。

from blog.

sivagao avatar sivagao commented on May 25, 2024

@flyinhigh 哈哈,前面那个其实是包含 es6 的 template string 的语法(内插值)啦,去了解下就知道了~

from blog.

BuptStEve avatar BuptStEve commented on May 25, 2024

写得很棒~一点儿小意见...

  • 第一个例子既然用 const 了,可以用 includes 替代 indexOf...
  • 最后少了个 :let randomColor = () =>#${(Math.random() * 0xFFFFFF << 0).toString(16)};

from blog.

sivagao avatar sivagao commented on May 25, 2024

@BuptStEve 很仔细。用新的includes很好,来清除掉怪异的!!indexOf

from blog.

chengmu avatar chengmu commented on May 25, 2024

这个不是去年jsconf的js code smells的ppt吗? http://elijahmanor.com/javascript-smells/

是不是说明在文章开头原作者和来源好一点?

from blog.

sivagao avatar sivagao commented on May 25, 2024

@chengmu 说的很对,现在的文章都会在开头说明来源。老文章并没有这些意识 /(ㄒoㄒ)/~~

from blog.

Related Issues (20)

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.