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 christmasTree(w: number, ch: string, sep: string, isEmoji: boolean = false) { | |
if (w % 2 !== 0) { | |
console.log('Please pick an even number for the height of the tree.') | |
return | |
} | |
const spacingMultiplier = isEmoji ? 2 : 1 // Emoji characters are roughly 2 spaces wide | |
for (let i = 1; i < w; i += 2) { | |
const spacing = (w - i - 1) / 2 |
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
[Symbol.iterator]() { | |
let index = 0 | |
return { | |
next: () => { | |
if (index <= this.items.length) { | |
const res = { value: this.items[index], done: false } | |
index = index + 1 | |
return res |
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
# ZSH Shell | |
export ZSH=/Users/ronald/.oh-my-zsh | |
ZSH_THEME="robbyrussell" | |
plugins=(git extract heroku pass) | |
fpath+=~/.zfunc | |
autoload -U compinit && compinit | |
source $ZSH/oh-my-zsh.sh | |
# Base |