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

JSfullMethods

This document is a cheat sheet for JavaScript, covering functions, strings, numbers, arrays, event handlers, and regular expressions. It includes various methods and properties associated with each category, providing quick references for developers. The cheat sheet is authored by janslow and was last updated on June 28, 2014.

Uploaded by

edelisakson
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)
3 views2 pages

JSfullMethods

This document is a cheat sheet for JavaScript, covering functions, strings, numbers, arrays, event handlers, and regular expressions. It includes various methods and properties associated with each category, providing quick references for developers. The cheat sheet is authored by janslow and was last updated on June 28, 2014.

Uploaded by

edelisakson
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 Compilation Cheat Sheet

by janslow via cheatography.com/1842/cs/565/

JavaScript Functions Misc (cont) JavaScript Numbers and Maths

decode​URI() isNaN() elemen​t.i​n returns all the HTML between the abs() min()

decode​URI​Com​pon​ent() Number() ne​rHTML opening and closing tags acos() NEGATI​VE_​INF​INITY

encode​URI() parseF​loat() elemen​t.n​o property, returns the number of asin() PI


deType the node type
encode​URI​Com​pon​ent() parseInt() atan() POSITI​VE_​INF​INITY
elemen​t.c​h A node list of child nodes that are
escape() String() atan2() pow()
il​dNodes indexed numeri​cally, and appear
eval() unescape() in source order. ceil() random()

isFinite() elemen​t.c​h Returns the number of child cos() round()


il​dNo​des.l nodes of the element E sin()
JavaScript Strings ength
exp() sqrt()
charAt() slice() floor() SQRT1_2
JavaScript Arrays
charCo​deAt() split() x LN10 SQRT2
concat() slice()
concat() substr() LN2 tan()
join() sort()
fromCh​arC​ode() substr​ing() log() toSource()
length splice()
indexOf() toLowe​rCase() LOG10E toExpo​nen​tial()
pop() toSource()
lastIn​dexOf() toUppe​rCase() LOG2E toFixed()
push() toString()
length toLoca​leL​owe​rCase() max() toPrec​ision()
reverse() unshift()
locale​Com​pare() toLoca​leU​ppe​rCase() MAX_VALUE toString()
shift() valueOf()
match() x toSource() MIN_VALUE valueOf()
replace() x valueOf() NaN
Adding to an array
search() x
.length Adds one value to the end of an
String object methods with an x support regular Event Handlers
property array
expres​sions. onabort The user aborted loading the
push() Adds one or more items to the end
of an array page
Misc onblur The user left the object
unshift() Adds one or more items to the
parseInt() Takes a value and tries to convert beginning of an array. onchange The user changed the object
it to an integer
onclick The user clicked an object
isNaN() Returns true if something is not a Remove item from an array
onerror The script encoun​tered an error
number.
pop() Removes the last item from the array onfocus The user made an object active
setTim​eo Specify that am action should
shift() Removes the first item from the array
ut() occur on a particular schedule onload The object finished loading

onmous​eove The cursor moved over an


Math.floor Rounds a number down
r object
Math.r​and Generaters a random number
onmouseout The cursor moved off an object
om between 0 and 1
onselect The user selected the contents
getEle​men​tsB​yTa​gName()
of an object
getEle​men​tById()
onsubmit The user submitted a form
getEle​men​tsB​yCl​ass​Name()
onunload The user left the page

onmove The window is moved

By janslow Not published yet. Sponsored by Readability-Score.com


cheatography.com/janslow/ Last updated 28th June, 2014. Measure your website readability!
Page 1 of 2. https://readability-score.com
JavaScript Compilation Cheat Sheet
by janslow via cheatography.com/1842/cs/565/

Event Handlers (cont)

onmous​edo A mouse button is pressed down


wn

onmouseup A mouse button is released

onmous​emo The mouse moves


ve

ondblclick A double click of a mouse button

onclick A single click (down and then up) of a


mouse button

onreset A reset button is clicked on a form

onkeydown Triggered when a key is pressed down

onkeyup Triggered when a key is released

onkeypress Triggered when a key is pressed and then


released

JavaScript RegExp Object

compile() lastParen

exec() leftCO​ntext

global multiline

ignoreCase rightC​ontext

input source

lastIndex test()

lastMatch

By janslow Not published yet. Sponsored by Readability-Score.com


cheatography.com/janslow/ Last updated 28th June, 2014. Measure your website readability!
Page 2 of 2. https://readability-score.com

You might also like