100% de satisfacción garantizada Inmediatamente disponible después del pago Tanto en línea como en PDF No estas atado a nada 4.2 TrustPilot
logo-home
Notas de lectura

JavaScript Apuntes FULL

Puntuación
-
Vendido
-
Páginas
4
Subido en
20-09-2022
Escrito en
2019/2020

Dejo todos los apuntes de java recaudados por varias personas durante años que te ayudaran muchísimo en tu camino.









Ups! No podemos cargar tu documento ahora. Inténtalo de nuevo o contacta con soporte.

Información del documento

Subido en
20 de septiembre de 2022
Número de páginas
4
Escrito en
2019/2020
Tipo
Notas de lectura
Profesor(es)
Enrique clemente
Contiene
Todas las clases

Vista previa del contenido

CHEAT SHEET

JAVASCRIPT WEB DEVELOPMENT
Created by @Manz ( https://twitter.com/Manz ) https://lenguajejs.com/

n Number() = 42 s String() = 'text' a Array() = [1, 2, 3]
PROPERTIES PROPERTIES PROPERTIES

n .POSITIVE_INFINITY +∞ equivalent n .length string size n .length number of elements
n .NEGATIVE_INFINITY -∞ equivalent METHODS METHODS
n .MAX_VALUE largest positive value s .charAt(index) char at position [i] b .isArray(obj) check if obj is array
n .MIN_VALUE smallest positive value n .charCodeAt(index) unicode at pos. b .includes(obj, from) include element?
n .EPSILON diff between 1 & smallest >1 n .codePointAt(index) cp at position n .indexOf(obj, from) find elem. index
n .NaN not-a-number value s .fromCharCode(n1, n2...) code to char n .lastIndexOf(obj, from) find from end
METHODS s .fromCodePoint(n1, n2...) cp to char s .join(sep) join elements w/separator
s .toExponential(dec) exp. notation s .concat(str1, str2...) combine text + a .slice(ini, end) return array portion
s .toFixed(dec) fixed-point notation b .startsWith(str, size) check beginning a .concat(obj1, obj2...) return joined array
s .toPrecision(p) change precision a .flat(depth) return flat array at n depth
b .endsWith(str, size) check ending
b .isFinite(n) check if number is finite b .includes(str, from) include substring?
MODIFY SOURCE ARRAY METHODS

b .isInteger(n) check if number is int. a .copyWithin(pos, ini, end) copy elems
n .indexOf(str, from) find substr index
b .isNaN(n) check if number is NaN a .fill(obj, ini, end) fill array with obj
n .lastIndexOf(str, from) find from end
n .parseInt(s, radix) string to integer n a .reverse() reverse array & return it
.search(regex) search & return index
n .parseFloat(s, radix) string to float a .sort(cf(a,b)) sort array (unicode sort)
n .localeCompare(str, locale, options)
a .splice(ini, del, o1, o2...) del&add elem
a .match(regex) matches against string
r Regexp() ITERATION METHODS
= /.+/ig a .matchAll(regex) return iterator w/all
ai .entries() iterate key/value pair array
PROPERTIES s .normalize(form) unicode normalize
n .lastIndex index to start global regexp s ai .keys() iterate only keys array
.padEnd(len, pad) add end padding
s .flags active flags of current regexp s ai .values() iterate only values array
.padStart(len, pad) add start padding
b .global flag g (search all matches) s .repeat(n) repeat string n times CALLBACK FOR EACH METHODS
b .ignoreCase flag i (match lower/upper) s .replace(str|regex, newstr|func) b .every(cb(e,i,a), arg) test until false
b .multiline flag m (match multiple lines) s .slice(ini, end) str between ini/end b .some(cb(e,i,a), arg) test until true
b .sticky flag y (search from lastIndex) s a .map(cb(e,i,a), arg) make array
.substr(ini, len) substr of len length
b .unicode flag u (enable unicode feat.) a .filter(cb(e,i,a), arg) make array w/true
s .substring(ini, end) substr fragment
s .source current regexp (w/o slashs) o
a .split(sep|regex, limit) divide string .find(cb(e,i,a), arg) return elem w/true
METHODS
s .toLowerCase() string to lowercase n .findIndex(cb(e,i,a), arg) return index
a .exec(str) exec search for a match
s .toUpperCase() string to uppercase a .flatMap(cb(e,i,a), arg) map + flat(1)
b .test(str) check if regexp match w/str
s .trim() remove space from begin/end .forEach(cb(e,i,a), arg) exec for each
CLASSES
s .trimEnd() remove space from end o .reduce(cb(p,e,i,a), arg) accumulative
. any character \t tabulator o .reduceRight(cb(p,e,i,a), arg) from end
s .trimStart() remove space from begin
\d digit [0-9] \r carriage return
\D no digit [^0-9] \n line feed s .raw`` template strings with ${vars} ADD/REMOVE METHODS

\w any alphanumeric char [A-Za-z0-9_] o .pop() remove & return last element
d Date()
\W no alphanumeric char [^A-Za-z0-9_] n .push(o1, o2...) add elem & return length
METHODS
\s any space char (space, tab, enter...) o .shift() remove & return first element
\S no space char (space, tab, enter...) n .UTC(y, m, d, h, i, s, ms) timestamp n .unshift(o1, o2...) add elem & return len
\xN char with code N [\b] backspace n .now() timestamp of current time
\uN char with unicode N \0 NUL char n .parse(str) convert str to timestamp UNSHIFT
[1,2,3]
PUSH


CHARACTER SETS OR ALTERNATION n .setTime(ts) set UNIX timestamp SHIFT POP

[abc] match any character set n .getTime() return UNIX timestamp f Function() = function(a, b) { ... }
[^abc] match any char. set not enclosed UNIT GETTERS / SETTERS (ALSO .getUTC*() / .setUTC*() )
PROPERTIES

a|b match a or b n .get / .setFullYear(y, m, d) (yyyy) o .length return number of arguments
BOUNDARIES n .get / .setMonth(m, d) (0-11) s .name return name of function
^ begin of input $ end of input n .get / .setDate(d) (1-31) o .prototype prototype object
\b zero-width word boundary n .get / .setHours(h, m, s, ms) (0-23) METHODS

\B zero-width non-word boundary n .get / .setMinutes(m, s, ms) (0-59) o .call(newthis, arg1, arg2...) change this
GROUPING n .get / .setSeconds(s, ms) (0-59) o .apply(newthis, arg1) with args array
(x) capture group (?:x) no capture group n .get / .setMilliseconds(ms) (0-999) o .bind(newthis, arg1, arg2...) bound func
\n reference to group n captured n .getDay() return day of week (0-6)
QUANTIFIERS LOCALE & TIMEZONE METHODS
n number d date
x* preceding x 0 or more times {0,} n .getTimezoneOffset() offset in mins n NaN (not-a-number) r regular expresion
x+ preceding x 1 or more times {1,} s .toLocaleDateString(locale, options) s string f function
x? preceding x 0 or 1 times {0,1} s .toLocaleTimeString(locale, options) b boolean (true/false) o object
x{n} n ocurrences of x s .toLocaleString(locale, options) a array undefined
x{n,} at least n ocurrences of x s .toUTCString() return UTC date available on ECMAScript 2015 or higher
x{n,m} between n & m ocurrences of x s .toDateString() return American date n static (ex: Math.random())
ASSERTIONS s .toTimeString() return American time n non-static (ex: new Date().getDate())
x(?=y) x (only if x is followed by y) s .toISOString() return ISO8601 date
argument required
x(?!y) x (only if x is not followed by y) s .toJSON() return date ready for JSON
argument optional
10,49 €
Accede al documento completo:

100% de satisfacción garantizada
Inmediatamente disponible después del pago
Tanto en línea como en PDF
No estas atado a nada

Conoce al vendedor
Seller avatar
kenbushseller

Conoce al vendedor

Seller avatar
kenbushseller IES Albarregas
Ver perfil
Seguir Necesitas iniciar sesión para seguir a otros usuarios o asignaturas
Vendido
0
Miembro desde
3 año
Número de seguidores
0
Documentos
10
Última venta
-
apunteskenbush

Subo apuntes bien completos y exámenes finales para superar tu curso sin problemas.

0,0

0 reseñas

5
0
4
0
3
0
2
0
1
0

Recientemente visto por ti

Por qué los estudiantes eligen Stuvia

Creado por compañeros estudiantes, verificado por reseñas

Calidad en la que puedes confiar: escrito por estudiantes que aprobaron y evaluado por otros que han usado estos resúmenes.

¿No estás satisfecho? Elige otro documento

¡No te preocupes! Puedes elegir directamente otro documento que se ajuste mejor a lo que buscas.

Paga como quieras, empieza a estudiar al instante

Sin suscripción, sin compromisos. Paga como estés acostumbrado con tarjeta de crédito y descarga tu documento PDF inmediatamente.

Student with book image

“Comprado, descargado y aprobado. Así de fácil puede ser.”

Alisha Student

Preguntas frecuentes