this
vs
that
GitHub ★ 479
What is the
difference
between
this
&
that?
CSS
:active vs :focus
border-box vs content-box
border vs outline
display: none vs [hidden]
display: none vs opacity: 0 vs visibility: hidden
margin vs padding
Normalize vs Reset CSS
style="width: ___" vs width="___"
word-break: break-all vs word-wrap: break-word
DOM
addEventListener() function vs on property
clientHeight vs offsetHeight vs scrollHeight
clientY vs pageY
currentTarget vs target
DOMContentLoaded vs load
event bubbling vs capturing
event.preventDefault vs return false
key vs keyCode vs which
keydown vs keypress vs keyup
mouseenter vs mouseover
naturalWidth vs width
nodeName vs tagName
parentElement vs parentNode
stopImmediatePropagation vs stopPropagation
HTML
alt vs title
<b>, <i> vs <strong>, <em>
<button> vs <input type="button" />
class vs id
<div> vs <section>
Element vs Node
script async vs script defer
JavaScript
apply vs call
argument vs parameter
array = [] vs array.length = 0
arrow vs regular function
concat vs push
const vs let vs var
delete obj.property vs obj.property = undefined
double quotes vs single quote
encodeURI vs encodeURIComponent
== vs ===
for ... in vs for ... of
function declaration vs function expression
hasOwnProperty vs in
instanceof vs typeof
Map vs WeakMap
method in class constructor vs prototype
null vs undefined
Number() vs parseInt()
Object.getOwnPropertyNames() vs Object.keys()
Object.is() vs ===
object.property vs object['property']
Object vs Map
++value vs value++
slice vs splice
string.charAt(i) vs string[i]
substr vs substring
undefined vs void
variable === undefined vs. typeof variable === "undefined"
React
<> vs React.Fragment
TypeScript
const enum vs enum
const vs readonly
*.d.ts vs *.ts
function vs property in interface
interface vs type
literal union type vs string enums
string vs String
Hit the Subscribe button for the latest news on my tools. No spam. Ever!
Subscribe
Products
Blur Page
Check Browsers Support
Fake Numbers
Form Validation
React PDF Viewer
Resources
1 LOC (3.3k★)
CSS Layout (2.7k★)
HTML DOM (3.1k★)
this VS that
Follow me
dev.to
GitHub
Twitter
© 2020 Nguyen Huu Phuoc. All rights reserved