Please enable JavaScript.
Coggle requires JavaScript to display documents.
Objects (Properties (Adding (object.newPropertie=value), Changing (object…
Objects
Properties
Adding
object.newPropertie=value
Changing
object.propertie=newValue
delete
delete object.propertie
nested objects
object as propertie
lazy evaluation
value = object.propertie || "default"
important
falsy values
0 is false
objects as parameters
function({propertie1:val1, propertie2:val2});
Built-in objects
JSON
{"propertie":value}
methods
parse
stringify
MATH
immutable
constants
operations
ciel
cieling
round up
floor
round down
convert to integer
trigenometry
DATE
setters
getters
RegExp
literal characters
meta characters
\
d
digitis
0-9
negation
\D
w
character and digits
A-Z, a-z, 0-9
negation
\W
s
white space
negation
\S
.
any char
quantifiers
change meta char
*
0 or more
+
1 or more
?
0 or 1
{n,m}
min, max
position
^
begining
$
end
\b
word bound
\b\w{4,6}\b
4 - 6 length words
character classes
[arg1,arg2,...argn ]
OR grouping
alternations
(arg1 | arg2)
whole strings
Capturing groups
paranthesis around reg expression
part
(\d{3})[-.]
each group
$nr
$1
create pattern
/
regExp
/
test pattern
pattern.test("string")
Basics
Predefined
functions
Arrays
access properties
dot notations
object.propertie
square bracket
object['propertie']
advantages
dynamically name
object[prop1 + prop2]
undefined
no such propertie
methods
same as properties
plus ()
check inclusion
"propertie" in object
object.propertie !== undefined
inheritance
object.hasOwnPropertie("propertie")
show all
for (key val in object)