A postmortem is a written record of an incident. Among other things, it documents the incident’s impact, what caused it, the actions taken to mitigate or fix it, and how to prevent it from happening again.
This file contains 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
<List> | |
{["Evan", "Ben", "Maria", "Daniel"].map((name, index) => ( | |
<span key={index}>{name}</span> | |
))} | |
</List> |
This file contains 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
// Double input with non-arrow function and it's arguments object | |
function doubleNumbers() { | |
return [...arguments].map((a) => a * 2); | |
} | |
// or with arrow function and destructured parameters | |
const doubleNumbers = (...args) => { | |
return args.map((a) => a * 2); | |
}; |
This file contains 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
// Given an array of people objects (where each person | |
// has a name and a number of pizza slices they’re | |
// hungry for) and a number for the number of slices | |
// that the pizza can be sliced into, return the number of pizzas | |
// you need to buy. | |
const arr = [{ name: 'Joe', num: 9 }, { name: 'Cami', num: 3 }, { name: 'Cassidy', num: 4 }] | |
const gimmePizza = (arr, num) => { | |
const slices = arr.reduce((acc, person) => acc + person.num, 0); |
This file contains 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
Currently reading: Structure and Interpretation of Computer Programs | |
------------------------------------------------- | |
Recently read: Functional JavaScript by Michael Fogus |
This file contains 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
// Given a positive integer n, write a function that | |
// returns true if it is a perfect square and false otherwise. | |
// Don’t use any built-in math functions like sqrt. | |
// Hint: Use binary search! | |
const perfectSquare = (num) => { | |
let start = 1; | |
let end = num; | |
let ans = 0; | |
This file contains 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
import react from "eslint-plugin-react"; | |
import reactHooks from "eslint-plugin-react-hooks"; | |
import _import from "eslint-plugin-import"; | |
import unusedImports from "eslint-plugin-unused-imports"; | |
import reactRefresh from "eslint-plugin-react-refresh"; | |
import { fixupPluginRules } from "@eslint/compat"; | |
import perfectionist from "eslint-plugin-perfectionist"; | |
import sonarjs from "eslint-plugin-sonarjs"; | |
export default [ |
This file contains 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
module.exports = { | |
env: { | |
es6: true, | |
}, | |
globals: { | |
React: 'writable', | |
}, | |
parser: '@typescript-eslint/parser', | |
parserOptions: { | |
ecmaVersion: 9, |