JavaScript Cheat Sheet Free Download


JavaScript cheat sheet for newbies learning JavaScript. This JavaScript cheat sheet is made by DavidChild from cheatography.com
Regular Expres­sions Syntax
^         Start of string


$         End of string


.         Anysingle character


(a|b)     a or b


(...)     Groupsection


[abc]     Inrange (a, b or c)


[^abc]    Not inrange


s         Whitespace


a?        Zero or one of a


a*        Zero ormore of a


a*?       Zero ormore,ungreedy


a+        One ormore of a


a+?       One ormore,ungreedy


a{3}      Exactly 3 of a


a{3,}     3 ormore of a


a{,6}     Up to 6 of a


a{3,6}    3 to 6 of a


a{3,6}?   3 to 6 of a,ungreedy


                            Escapecharacter


[:punct:] Anypunctu­ation symbol


[:space:] Anyspace character


[:blank:] Space or tab


JavaScript Event Handlers
onabort     onmous­edown


onblur      onmous­emove


onchange    onmouseout

onclick     onmous­eover


ondblclick  onmouseup


ondragdrop  onmove

onfocus     onresize

onerror     onreset


onkeypress  onsubmit

onkeydown   onselect


onkeyup     onunload
onload




JavaScript Dates
Date()               setMonth()


getDate()            setFul­lYear()


getDay()             setHours()


getMonth             setMin­utes()

 

getFul­lYear          setSec­onds()


getYear              setMil­lis­eco­nds()


getHours             setTime()

 

getMinutes           setUTC­Date()


getSeconds           setUTC­Day()



getMil­lis­econds      setUTC­Month()



getTime              setUTC­Ful­lYear()



getTim­ezo­neO­ffset()  setUTC­Hours()


getUTC­Date()         setUTC­Min­utes()


getUTC­Day()          setUTC­Sec­onds()


getUTC­Month()        setUTC­Mil­lis­eco­nds()


getUTC­Ful­lYear()     toSource()


getUTC­Hours()        toString()



getUTC­Min­utes()      toGMTS­tring()


getUTC­Sec­onds()      toUTCS­tring()


getUTC­Mil­lis­eco­nds()toLoca­leS­tring()


parse()              UTC()


setDate()            valueOf()


Pattern Modifiers
g    Globalmatch


i*   Case-i­nse­nsitive


m*   Multiplelines


s*   Treat string assingle line


x*   Allowcomments andwhitespace inpattern


e*   Evaluatereplac­ement


U*   Ungreedypattern


JavaScript Arrays
concat()  slice()


join()    sort()



length    splice()


pop()     toSource()


push()    toString()


reverse()unshift()


shift()   valueOf()


JavaScript Strings
charAt()       slice()


charCo­deAt()   split() x


concat()       substr()


fromCh­arC­ode()substr­ing()


indexOf()      toLowe­rCase()


lastIn­dexOf()  toUppe­rCase()


length         toLoca­leL­owe­rCase()


locale­Com­pare()toLoca­leU­ppe­rCase()


match()x      toSource()


replace()x    valueOf()


search() x


JavaScript RegExp Object
compile()   lastParen


exec()      leftCO­ntext


global      multiline


ignoreCase  rightC­ontext


input       source

lastIndex   test()


lastMatch


JavaScript Numbers and Maths
abs()     min()


acos()    NEGATI­VE_­INF­INITY


asin()    PI


atan()    POSITI­VE_­INF­INITY


atan2()   pow()


ceil()    random()


cos()     round()


E         sin()


exp()     sqrt()


floor()   SQRT1_2


LN10      SQRT2

LN2       tan()


log()     toSource()


LOG10E    toExpo­nen­tial()


LOG2E     toFixed()


max()     toPrec­ision()


MAX_VALUE toString()


MIN_VALUE valueOf()


NaN


JavaScript Booleans
toSource()     valueOf()


toString()


JavaScript Functions
decode­URI()           isNaN()


decode­URI­Com­pon­ent()  Number()


encode­URI()           parseF­loat()


encode­URI­Com­pon­ent()  parseInt()


escape()              String()


eval()                unescape()


isFinite()



TAG