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
| <style> | |
| .iframe-container{ | |
| position: relative; | |
| width: 100%; | |
| padding-bottom: 56.25%; | |
| height: 0; | |
| } | |
| .iframe-container iframe{ | |
| position: absolute; | |
| top:0; |
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 additiveInverse(arr) { | |
| return arr.map(x => -x); | |
| } |
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 numberSyllables(word) { | |
| return word.split(`-`).length | |
| } |
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 monthName(num) { | |
| return new Date(2000, num - 1).toLocaleString("en-us", {month: "long"}); | |
| } |
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
| .todo-item__text--completed { | |
| display: inline-block; | |
| position: relative; | |
| transition: all .5 cubic-bezier(.55,0,.1,1); | |
| /* text-decoration: line-through; */ | |
| } | |
| .todo-item__text--completed:after { | |
| content: ''; | |
| position: absolute; |
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
| /* http://meyerweb.com/eric/tools/css/reset/ | |
| v2.0-modified | 20110126 | |
| License: none (public domain) | |
| */ | |
| html, body, div, span, applet, object, iframe, | |
| h1, h2, h3, h4, h5, h6, p, blockquote, pre, | |
| a, abbr, acronym, address, big, cite, code, | |
| del, dfn, em, img, ins, kbd, q, s, samp, | |
| small, strike, strong, sub, sup, tt, var, |
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 allCategories = ['all', ...new Set(items.map((item) => item.category))]; |
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
| let sortUsersByDescendingFollowCount = users.sort((a, b) => a.followers < b.followers ? 1 : -1) |
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
| // Capitalize the first letter of a string | |
| const capitalize = str => `${str.charAt(0).toUpperCase()}${str.slice(1)}`; | |
| capitalize("hello, you are a cool person!"); | |
| // Result: "Hello, you are a cool person!" |
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
| // Sort an array containing numbers | |
| const sort = arr => arr.sort((a, b) => a - b); | |
| sort([1, 5, 2, 4, 3]); | |
| // Result: [1, 2, 3, 4, 5] |
OlderNewer