seafronthu
seafronthu
> 可否在服务器上使用? 那也行吧,本来想做个纯静态的
``` javascript const target1 = new Blob() const target2 = "string" const target3 = {a: 1} console.log(Object.prototype.toString.call(target1)) // "[object Blob]" console.log(Object.prototype.toString.call(target2)) // "[object String]" console.log(Object.prototype.toString.call(target3)) // "[object Object]" ```
把长度为0的数组单独定义`const arr = []`再执行`copyWithin`,打印下`console.log(arr)`,原数组没有发生变化。
``` javascript // 使用Map function hasCycle(head: ListNode | null): boolean { const listNodeMap = new Map() if (!head) { return false } let listNode = head listNodeMap.set(listNode, listNode.val) while(listNode) {...
> This is because we disable minification for lib mode. > > https://github.com/vitejs/vite/blob/ac329685bba229e1ff43e3d96324f817d48abe48/packages/vite/src/node/plugins/terser.ts#L90-L91 > > > Probably we can enable it and set `comments: 'all'` automatically. Sometimes confusion is needed,...
``` javascript const num = 10.36 | 0 // 等同于 const num2 = Math.floor(10.36) ```