Skip to content

Instantly share code, notes, and snippets.

View tiotamara's full-sized avatar

Tio Tamara tiotamara

View GitHub Profile
@tiotamara
tiotamara / anagram.js
Last active October 19, 2022 15:34
Logic Test
const anagrams = (arr) => {
const result = {}
for (value of arr) {
const key = value.split('').sort().join('')
if (typeof result[key] === 'undefined') {
result[key] = []
}
result[key].push(value)
}
return Object.values(result)
# remove specific file from git cache
git rm --cached filename
# remove all files from git cache
git rm -r --cached .
git add .
git commit -m ".gitignore is now working"