Format a date in JavaScript without a library
toLocaleDateString formats a date for a locale (en-US, en-GB, en-CA) or a style such as dateStyle: 'long'. toISOString is UTC and can show the day before.
Newest first. Each page has the steps, the code to copy and a link to the Stack Overflow question it answers.
toLocaleDateString formats a date for a locale (en-US, en-GB, en-CA) or a style such as dateStyle: 'long'. toISOString is UTC and can show the day before.
indexOf finds the item and splice removes it in place; filter builds a new array without it. Check for -1 before you splice.
grep -rn searches a folder recursively and prints every match with its line number; -l lists only the file names, --include keeps one file type.
git branch -d removes your local copy (-D forces it when the branch is not merged); git push origin --delete removes the copy on the remote.
git reset --soft HEAD~1 removes the last commit and keeps your changes staged; git reset --hard HEAD throws the changes away too.