Skip to content

Instantly share code, notes, and snippets.

View henokkhm's full-sized avatar

Henok Kirubel henokkhm

View GitHub Profile
@henokkhm
henokkhm / gist:658fd4f9441e8c24f66f7a8cdd30b941
Created August 18, 2023 07:35
LeetCode Climb Stairs [18 Aug 2023 Mob Programming]
/**
* Link to problem
* https://leetcode.com/problems/climbing-stairs/submissions/
*/
/**
* @param {number} n
* @return {number}
*/

Instructions: For each of the following code snippets, answer the following questions:

  • Is it DRY?
  • If it is not DRY, show how you can make it DRY by adding your version of the code.
  • If it is DRY, explain why it is DRY.

Code Snippet 1

const pets = ['Cat', 'Dog', 'Bird', 'Fish', 'Frog', 'Hamster', 'Pig', 'Horse', 'Lion', 'Dragon'];
// Print all pets
console.log(pets[0]);
@henokkhm
henokkhm / eslint_prettier_airbnb.md
Created October 20, 2022 13:04 — forked from geordyjames/eslint_prettier_airbnb.md
VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

VSCode - ESLint, Prettier & Airbnb Setup for Node.js Projects

1. Install ESLint & Prettier extensions for VSCode

Optional - Set format on save and any global prettier options

2. Install Packages

npm i -D eslint prettier eslint-plugin-prettier eslint-config-prettier eslint-config-airbnb-base eslint-plugin-node eslint-config-node