Skip to content

Instantly share code, notes, and snippets.

A cheatsheet for javascript syntax with added Swift examples where relevant. Most of this is generic javascript stuff but there's some react specific info at the bottom.

Variable Definitions

// 'const' for a variable that will not change, eslint will warn you if you try to mutate this
// 'let' for a mutable variable, you may also see var in some tutorials which is sort of the legacy version of let
// Always prefer const, only use let when absolutely necessary. This makes it clear which variables are likely to be reassigned over time!

const x = 0
#!/usr/bin/env zsh
# Multi-project worktree manager with Claude support
#
# ASSUMPTIONS & SETUP:
# - Your git projects live in: ~/projects/
# - Worktrees will be created in: ~/projects/worktrees/<project>/<branch>
# - New branches will be named: <your-username>/<feature-name>
#
# DIRECTORY STRUCTURE EXAMPLE:
# ~/projects/