Skip to content

james-brndwgn/coding-cheatsheet

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 

Repository files navigation

Git

Discard unstaged changes

git checkout -- .

Javascript

Arrays

Easily convert NodeList/HTMLCollection to Array with ES6 spread operator

const arr = [...document.querySelectorAll('div')];

Quickly create a number of items in an Array

Array.apply(null, { length: 20 }).map(() => 'foo')

DOM

Programmatically focus an element by adding tabindex="0" to it and fire this.el.focus()

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published