
nodejs
彡影分身彡
java web
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
nodejs buffer BE, LE
const buf = Buffer.from([0, 5]); // Prints: 5 console.log(buf.readInt16BE()); // Prints: 1280 console.log(buf.readInt16LE()); 5 : 0000 0000 0000 0101 1280 : 0000 0101 0000 0000原创 2018-10-19 17:15:51 · 541 阅读 · 0 评论 -
js功能实现
左边补零 // 不足5位左边补零 (Array(5).join('0') + 100).slice(-5)原创 2018-11-02 09:56:36 · 546 阅读 · 0 评论 -
nodejs class私有属性测试
版本: node -v v12.11.0 测试 'use strict' class a1 { //私有属性 #a; constructor() { this.#a = 'private field'; this.c = 'c'; } b() { console.log(`hello ${this.#...原创 2019-09-29 17:26:59 · 2087 阅读 · 0 评论