第87期 — 2020-12-27

在浏览器中阅读

周e信

扫描二维码关注微信公众号

Javascript

十个必须知道的javascript技巧🔗

~~ 取整

// instead of
math.round(math.random*50)
// use
~~(math.random*50)
You can also use the “~~” operator to convert anything into a number value.
Example snippet:
~~('whitedress') // returns 0
~~(NaN) // returns 0

~~1.6 === 1

Array.length

var array = [a, b, c, d, e, f, g, h, i , j];
console.log(array.length); // returns the length as 10
array.length = 4;
console.log(array.length); // returns the length as 4
console.log(array); // returns “a,b,c,d”

大数组不要使用concat 应该使用push

var list1 = [a, b, c, d, e];
var list2 = [f, g, h, i, j];
console.log(list1.push.apply(list1, list2)); // returns the merged values of both arrays (a, b, c, d, e,f, g, h, i, j)

判断对象是否为空

Object.keys(objectName).length

Gert Svaiko

数据库

Amanda Fawcett

Go

Owncast

运维

CARL TASHIAN

Java

SuperTokens

其他

故事 - 做的小项目是怎样出售的🔗

这是买家主动找上门的

Ben

Derrick Stolee

在线游戏历史🔗

在线游戏网站

  1. Starjack.io

  2. Paper.io

  3. Surviv.io

  4. Hole.io

  5. Mope.io

  6. Mahjong Classic

  7. Uno Online

  8. Tanki Online

  9. Zombsroyale.io

  10. Slither.io

  11. Wormate2.io

  12. Snowball.io

  13. Starblast.io

  14. Moomoo.io

  15. Evowars.io

Iskren Ruskov

Senior Engineer为什么不喜欢代码面试🔗

真 - 牛人说的话 There’s absolutely no way I could pass the coding interview at any of the big tech companies. Even the ones where the interviewer learned to code from one of my tutorials.

Adam Storm

Lee Reilly

扫描二维码关注微信公众号
本期阅读量