GitHub
30秒学会 JavaScript 片段 – Deep map object keys
Deep maps an object’s keys. Creates an object with the same values as the provided object and ...
30秒学会 Python 片段 – Number is odd
Checks if the given number is odd. Checks whether a number is even or odd using the modulo (%) opera...
30秒学会 JavaScript 片段 – What is the difference between then and finally in a JavaScript promise?
On the surface, Promise.prototype.then() and Promise.prototype.finally() seem very similar. But ther...
30秒学会 CSS 片段 – Checkerboard background pattern
Creates a checkerboard background pattern. Use background-color to set a white background. Use backg...
30秒学会 JavaScript 片段 – How can I check if an array is a superset of another array in JavaScript?
A superset is a set that contains all the elements of another set, and possibly more. Knowing how to...
30秒学会 Python 片段 – Every nth element in list
Returns every nth element in a list. Use slice notation to create a new list that contains every nth...
30秒学会 CSS 片段 – Responsive layout with sidebar
Creates a responsive layout with a content area and a sidebar. Use display: grid on the parent conta...
30秒学会 CSS 片段 – Custom checkbox
Creates a styled checkbox with animation on state change. Use an <svg> element to create the c...
30秒学会 JavaScript 片段 – A cautionary tale about JavaScript callbacks
A piece of advice I’ve found myself repeating often as of late is this: When working with call...