摘要:
In this post, we’ll explore an intriguing use of JavaScript’s Proxy and Symbol.toPrimitive to perform cumulative operations, mimicking a numeric conte 阅读全文
摘要:
$breakpoints: ( 'phone': (320px, 480px), 'pad': (481px, 768px), 'notebook': (769px, 1024px), 'desktop': (1025px, 1200px), 'tv': 1201px, ) @mixin respo 阅读全文
摘要:
// Object.prototype[Symbol.iterator] = function() { // return Object.values(this)[Symbol.iterator](); // } Object.prototype[Symbol.iterator] = functio 阅读全文
摘要:
Normal browser has restiction that doesn't allow you automaticlly play the video, unless your site has high Media Enagement index (MEI). There are 2 w 阅读全文
摘要:
One way data binding, the parent component pasing data through v-modelto child component, if child modify the data, v-modelwill take care emit the cha 阅读全文
摘要:
/** * Big integer sum * Using strings to represent big integers * @param {string} a * @param {string} b * @returns {string} */ function bigIntSum(a, b 阅读全文
摘要:
When you use ChatGPT, the response comes in stream, so that it can appears on screen whenever data come back from server, we don't need to wait all da 阅读全文
摘要:
Try option 1: Promise Promise running in Microtask queue, and rendering should wait until the queue is empty; If you have a large number of time-consu 阅读全文
摘要:
const fetch = () => new Promise((res) => { setTimeout(() => res({ user: 'zhen' }), 1150) }) globalThis.fetch = fetch async function getUser() { return 阅读全文
摘要:
For this code, try to not modify the code itself but mutate obj var o = (function () { var obj = { a: 1, b: 2, }; return { get: function (k) { return 阅读全文