🧮 🩹 🧑 🧑🎨 🇦🇨 🧑🚀 🛺 🪓 🦡 🥯 👨🦲 👩🦲 🩰 🪕 🧺 🧔 🧃 🧢 👱♂️ 👱 👱♀️ 🟦 🦴 ⛹️♂️ ⛹️ ⛹️♀️ 🇧🇻 🥣 🧠 🤱 🧱 🥦 🧹 🟤 🤎 🟫 🧈 🥫 🤸 🇪🇦 🪑 ♟️ 🧒 🥢 🧗 🧗♂️ 🧗♀️ 🇨🇵 🧥 🥥 🥶 🧭 🧑🍳 💏 🏏 🥤 🧁 🥌 👨🦱 👩🦱 🤬 🥩 🧏♂️ 🧏 🧏♀️ 🇩🇬 🤿 🪔 🧬 🩸 🥟 🦻
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Array.prototype.contains: https://esdiscuss.org/topic/having-a-non-enumerable-array-prototype-contains-may-not-be-web-compatible | |
// Array.prototype.flatten: https://developers.google.com/web/updates/2018/03/smooshgate | |
// String.prototype.contains: https://bugzilla.mozilla.org/show_bug.cgi?id=1102219 | |
// globalThis: https://github.com/tc39/proposal-global/blob/master/NAMING.md | |
Array.prototype.all = Array.prototype.every | |
Array.prototype.any = Array.prototype.some | |
Array.prototype.contains = Array.prototype.includes | |
Array.prototype.flatten = Array.prototype.flat |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function getCommits () { | |
const days = Array.from(document.querySelectorAll('rect.day')) | |
return days | |
.map(({dataset}) => { | |
const date = new Date(`${dataset.date} 00:00:00`) | |
return { | |
count: dataset.count, | |
weekday: date.toLocaleDateString('en-US', { weekday: 'long' }), |
A list of GitHub emoji markup, adapted from rxavier’s Complete list of github markdown emoji markup, generated with a Grunt script for maintainability (see repository).
Smileys and People
Animals and Nature
Food and Drink
Activity
Travel and Places
Objects
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const colors = { | |
seashell: '#FFF5EE', | |
cornsilk: '#FFF8DC', | |
lemonchiffon: '#FFFACD', | |
floralwhite: '#FFFAF0', | |
snow: '#FFFAFA', | |
lightyellow: '#FFFFE0', | |
ivory: '#FFFFF0', | |
} | |
const target = 'ivory' |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class Gallery { | |
constructor(gallery) { | |
if (!gallery) { | |
throw new Error('No Gallery Found!'); | |
} | |
this.gallery = gallery; | |
// select the elements we need | |
this.images = Array.from(gallery.querySelectorAll('img')); | |
this.modal = document.querySelector('.modal'); | |
this.prevButton = this.modal.querySelector('.prev'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const form = document.querySelector('form') | |
// Our hypothetical form has the following elements: | |
// input[type="text"][name="fname"] | |
// input[type="text"][name="lname"] | |
// input[type="text"][name="zip"] | |
// input[type="email"][name="email"] | |
// Ways to Get Form Values: | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Project settings should contain only settings that have an impact on the codebase | |
// These settings may change how editor interacts with files. All settings that have to do | |
// with UI or opinionated editor behavior that doesn't affect code should go in user settings | |
// Editor Settings | |
// editor.insertSpaces, editor.tabSize: Prefer 2️⃣space indentation | |
// ESLint Settings | |
// editor.codeActionsOnSave Auto-correct ESLint code |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Show hidden characters
// DEPRECATED! SEE https://github.com/ricealexander/eslint-config-webtrinkets for up-to-date version | |
// Some Symbols used: | |
// ⭐️ - very strong preference | |
// 🤔 - very loose preference | |
// 🔥 - disabled and would not consider enabling | |
// ⚗ - testing out a rule | |
// 💔 - could not be configured in desired way | |
// 🐝 - did not work as expected or caused clashes with other rules |
(1.) Which of the following are valid arrays (Answer all that apply)
const A = ["Harder", "Better", "Faster", "Stronger"];
const B = [0, 1, 1, 2, 3, 5, 8, 13, 21, 34, 55, 89];
const C = [
"Urban Chestnut",
2009,
"4Hands",
2011,