0% found this document useful (0 votes)
54 views2 pages

Javascript Cheat Sheet PDF

This document provides a summary of JavaScript syntax including regular expressions, arrays, numbers and math functions, event handlers, dates, strings, booleans, and functions. It covers topics such as pattern matching, modifiers, the RegExp object, array methods, trigonometric functions, date objects and methods, string methods, and common functions.

Uploaded by

Anas CHAAIRI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
54 views2 pages

Javascript Cheat Sheet PDF

This document provides a summary of JavaScript syntax including regular expressions, arrays, numbers and math functions, event handlers, dates, strings, booleans, and functions. It covers topics such as pattern matching, modifiers, the RegExp object, array methods, trigonometric functions, date objects and methods, string methods, and common functions.

Uploaded by

Anas CHAAIRI
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

JavaScript Cheat Sheet

by Dave Child (DaveChild) via cheatography.com/1/cs/7/

Regular Expres​sions Syntax Pattern Modifiers (cont) JavaScript Arrays

^ Start of string x* Allow comments and whitespace in concat() slice()

$ End of string pattern join() sort()


e* Evaluate replac​ement
. Any single character length splice()
U* Ungreedy pattern
(a|b) a or b pop() toSource()

(...) Group section * PCRE modifier push() toString()

[abc] In range (a, b or c) reverse() unshift()


JavaScript RegExp Object
[^abc] Not in range shift() valueOf()
compile() lastParen
\s White space
exec() leftCO​ntext JavaScript Numbers and Maths
a? Zero or one of a
global multiline abs() min()
a* Zero or more of a
ignoreCase rightC​ontext acos() NEGATI​VE_​INF​INITY
a*? Zero or more, ungreedy
input source asin() PI
a+ One or more of a
lastIndex test() atan() POSITI​VE_​INF​INITY
a+? One or more, ungreedy
lastMatch atan2() pow()
a{3} Exactly 3 of a

a{3,} 3 or more of a ceil() random()


JavaScript Event Handlers
a{,6} Up to 6 of a cos() round()
onabort onmous​edown
a{3,6} 3 to 6 of a E sin()
onblur onmous​emove
a{3,6}? 3 to 6 of a, ungreedy exp() sqrt()
onchange onmouseout
\ Escape character floor() SQRT1_2
onclick onmous​eover
[:punct:] Any punctu​ation symbol LN10 SQRT2
ondblclick onmouseup
[:space:] Any space character LN2 tan()
ondragdrop onmove
[:blank:] Space or tab log() toSource()
onerror onreset
LOG10E toExpo​nen​tial()
There's an excellent regular expression tester
onfocus onresize
at: http:/​/re​gex​pal.com/ LOG2E toFixed()
onkeydown onselect
max() toPrec​ision()
Pattern Modifiers onkeypress onsubmit
MAX_VALUE toString()
g Global match onkeyup onunload
MIN_VALUE valueOf()
i* Case-i​nse​nsitive onload
NaN
m* Multiple lines

s* Treat string as single line

By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by ApolloPad.com


cheatography.com/davechild/ Last updated 11th May, 2016. Everyone has a novel in them. Finish Yours!
www.getpostcookie.com Page 1 of 2. https://apollopad.com
JavaScript Cheat Sheet
by Dave Child (DaveChild) via cheatography.com/1/cs/7/

JavaScript Booleans JavaScript Strings

toSource() valueOf() charAt() slice()

toString() charCo​deAt() split() x

concat() substr()
JavaScript Dates
fromCh​arC​ode() substr​ing()
Date() setMonth() indexOf() toLowe​rCase()
getDate() setFul​lYear() lastIn​dexOf() toUppe​rCase()
getDay() setHours() length toLoca​leL​owe​rCase()
getMonth setMin​utes() locale​Com​pare() toLoca​leU​ppe​rCase()
getFul​lYear setSec​onds() match() x toSource()
getYear setMil​lis​eco​nds() replace() x valueOf()
getHours setTime() search() x
getMinutes setUTC​Date()
String object methods with an x support regular
getSeconds setUTC​Day() expres​sions.
getMil​lis​econds setUTC​Month()
JavaScript Functions
getTime setUTC​Ful​lYear()

getTim​ezo​neO​ffset() setUTC​Hours() decode​URI() isNaN()

getUTC​Date() setUTC​Min​utes() decode​URI​Com​pon​ent() Number()

getUTC​Day() setUTC​Sec​onds() encode​URI() parseF​loat()

getUTC​Month() setUTC​Mil​lis​eco​nds() encode​URI​Com​pon​ent() parseInt()

getUTC​Ful​lYear() toSource() escape() String()

getUTC​Hours() toString() eval() unescape()

getUTC​Min​utes() toGMTS​tring() isFinite()

getUTC​Sec​onds() toUTCS​tring()

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

parse() UTC()

setDate() valueOf()

By Dave Child (DaveChild) Published 19th October, 2011. Sponsored by ApolloPad.com


cheatography.com/davechild/ Last updated 11th May, 2016. Everyone has a novel in them. Finish Yours!
www.getpostcookie.com Page 2 of 2. https://apollopad.com

You might also like

pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy