0% found this document useful (0 votes)
18 views8 pages

Javascript Cheatsheet 2026

The document provides a comprehensive overview of fundamental data types in JavaScript, including Numbers, Strings, Arrays, Sets, Maps, and more. It outlines their properties, methods, and various functionalities, such as iteration and modification methods. Additionally, it covers advanced topics like Math, RegExp, JSON, and date handling with Temporal and legacy Date objects.

Uploaded by

abadu2664
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)
18 views8 pages

Javascript Cheatsheet 2026

The document provides a comprehensive overview of fundamental data types in JavaScript, including Numbers, Strings, Arrays, Sets, Maps, and more. It outlines their properties, methods, and various functionalities, such as iteration and modification methods. Additionally, it covers advanced topics like Math, RegExp, JSON, and date handling with Temporal and legacy Date objects.

Uploaded by

abadu2664
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

LENGUAJEJS .

COM
BASIC FUNDAMENTAL DATATYPES
&
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

N Number S String A Array


PROPERTIES PROPERTIES PROPERTIES
n .POSITIVE_INFINITY +∞ n .length string size n .length number of elements
n .NEGATIVE_INFINITY -∞ POSITION METHODS METHODS
n .MAX_VALUE largest positive s .at( index ) char at pos .charAt() [i] o .at( n ) get element at position n [n]
n .MIN_VALUE smallest positive n .codePointAt( index ) code at position b .isArray( obj ) check is array
n .EPSILON min representable gap s .fromCodePoint( n1 , n2 ...) code to char b .includes( obj , from ) include element?
/ .NaN value not show as number n .indexOf( str , from ) find substr index b .indexOf( obj , from ) find elem. index
METHODS n .lastIndexOf( str , from ) find from end b .lastIndexOf( obj , from ) find from end
s .toExponential( dec ) → 1.24e+3 FRAGMENTS METHODS s .join( sep ) join elements w/ separator
s .toFixed( dec ) → 1234.57 s .repeat( n ) repeat string n times a .slice( ini , end ) return array portion
s .toPrecision( p ) → 1235 (4) s .substring( ini , end ) subtext substr() a .concat( obj1 , obj2 ...) combine arrays
s .toString( radix ) → 1235 (4) s .slice( ini , end ) str between ini/end a .flat( depth ) return flat array at n depth
↳ ( 74 ).toString( 16 ) → '4a' (0x4a) a .split( sep | regex , limit ) divide string MODIFY SOURCE ARRAY METHODS
b .isFinite( n ) finite number? SEARCH METHODS a .from( arraylike , (e,i,a) ) convert to array
b .isInteger( n ) integer? b .startsWith( str , size ) check beginning a .fromAsync( arraylike , (e,i,a) ) ↳ (async)
b .isNaN( n ) not a number? b .endsWith( str , size ) check ending a .of( obj1 , obj2 ,...) create array of objs
b .isSafeInteger( n ) safe? b .includes( str , from ) include substring? a .with( pos , obj ) clone with changes
n .parseInt( s , radix ) to integer n .search( regex ) search & return index a .copyWithin( pos , ini , end ) clone
n .parseFloat( s , radix ) to float a .match( regex ) matches against string a .fill( obj , ini , end ) fill array with obj
↳ [Link]( "10110" , 2 ) →22 a .matchAll( regex ) return iterator w/all a .toReversed() reverse array .reverse()
s .replace( str | regex , newstr | func ) a .toSorted( (a,b) ) sort array .sort()
S Set WeakSet
/ s .replaceAll( str | regex , newstr | func ) a .toSpliced( start , size , o1 , o2 ...)
PROPERTIES MODIFY METHODS ITERATION METHODS
n .size return number of items s .concat( str1 , str2 ...) combine text + ai .entries() iterate key/value pair array
METHODS s .toLowerCase()/.toLocaleLowerCase() ai .keys() iterate only keys array
s .add( item ) insert item ws s .toUpperCase()/.toLocaleUpperCase() ai .values() iterate only values array
b .has( item ) check presence ws s .padEnd( len , pad ) add end padding CALLBACK FOR EACH METHODS
b .delete( item ) remove item ws s .padStart( len , pad ) add start padding b .every( (e,i,a) ) test until false
/ .clear() purge all items s .trim() remove spaces from begin/end b .some( (e,i,a) ) test until true
ITERATION METHODS s .trimStart() ↳ from end trimLeft() a .map( (e,i,a) ) make array
i .keys() / .values() list values s .trimEnd() ↳ from begin trimRight() a .filter( (e,i,a) ) make array w/true
i .entries() list pair (key, value) s .raw`` template string with ${ vars } o .find( (e,i,a) ) search element
SET METHODS UNICODE METHODS o .findLast( (e,i,a) ) ↳ from last
b .isSubsetOf( s ) included in s s .normalize( form ) to standard unicode n .findIndex( (e,i,a) ) search index
b .isSupersetOf( s ) contains all b .isWellFormed() check malformed string n .findLastIndex( (e,i,a) ) ↳ from last
b .isDisjointFrom() no overlap? s .toWellFormed() fix malformed string a .flatMap( (e,i,a) ) map + flat(1)
s .union() merge uniques n .localeCompare( str , locale , options ) / .forEach( (e,i,a) ) exec for each
s .intersection() shared items o .reduce( (p,e,i,a) ) accumulative
s .difference() exclude overlaps M Map WeakMap
/
o .reduceRight( (p,e,i,a) ) ↳ from end
s .symmetricDifference() unshared PROPERTIES ADD REMOVE METHODS
/

CALLBACK FOR EACH METHODS n .size return number of items o .pop() remove & return last element
/ .forEach( (e,i,a) ) exec for each METHODS n .push( o1 , o2 ...) adds to end
m .set( key , value ) add pair (k,v) wm o .shift() remove & return last element
F Function o .get( key ) get value of key wm n .unshift( o1 , o2 ...) inserts at start
PROPERTIES b .has( key ) check key existence wm
o .length get number of arguments b .delete( key ) remove element wm n number d date
s .name return name of arguments / .clear() remove all items
/ Not a number s
- - string
o .prototype prototype object ITERATION METHODS
METHODS i .keys() list keys i .values() list values
r regular expr f function
o .call( newthis , a1 ...) set this i .entries() list pair (key, value) b boolean o object
o .apply( newthis , a1 ...) ↳ array CALLBACK FOR EACH METHODS a array / undefined
o .bind( newthis , a1 ...) ↳ no run / .forEach( (e,i,a) ) exec for each ? static method ? instance method
LENGUAJEJS
MATH REGEXP OBJECTS
,,
.COM
&
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

M Math R RegExp O Object


PROPERTIES PROPERTIES CREATION METHODS
n .E Euler's constant n .lastIndex next match index o .assign() copy properties
n .LN2 natural logarithm of 2 s .flags active regex flags o .create() new prototype object
n .LN10 natural logarithm of 10 b .dotAll dot matches newline s METHODS
n .LOG2E base 2 logarithm of E b .global full global matching g o .groupBy( obj , key ) group by criterion
n .LOG10E base 10 logarithm of E b .ignoreCase ignore letter case i b .is( o1 , o2 ) check exact value
n .PI ratio circumference/diameter b .multiline match multiple lines m OWN PROPERTIES
n .SQRT1_2 square root of 1/2 b .sticky search from lastIndex y o .defineProperty() set single descriptor
n .SQRT2 square root of 2 b .unicode enable full unicode u o .defineProperties() ↳ set multiple
METHODS b .unicodeSets extended unicode v o .getOwnPropertyDescriptor() fetch
n .abs( x ) absolute value b .hasIndices include index ranges d o .getOwnPropertyDescriptors( obj )
n .cbrt( x ) cube root s .source raw regex source o .getOwnPropertyNames() properties
n .clz32( x ) leading zero bits (32) METHODS o .getOwnPropertySymbols() symbols
n .exp( x ) return e^x b .test( str ) check if matching o .propertyIsEnumerable() check
n .expm1( x ) return (e^x)-1 a .exec( str ) capture .compile() o .hasOwn() own prop check
n .hypot( x1 , x2 ...) hypotenuse length CLASSES o .hasOwnProperty() own prop check
n .imul( a , b ) signed multiply . any character \t tabulator PROTOTYPE MANIPULATION
n .max( x1 , x2 ...) return max number \d digit [0-9] \r carriage return o .getPrototypeOf() prototype of object
n .min( x1 , x2 ...) return min number \w any alphanumeric char [A-Za-z0-9_] o .setPrototypeOf( obj ,) set prototype
n .pow( base , exp ) return base^exp ** \W no alphanumeric char [^A-Za-z0-9_] b .isPrototypeOf() check prototype
n .random() float random number [0,1) \s any space char (space, tab, enter...) MUTABILITY CONTROL
n .sign( x ) sign of number \S no space char (space, tab, enter...) o .preventExtensions() block additions
n .sqrt( x ) square root of number \x N char with code N [\b] ⌫BS b .isExtensible() check extensible
LOGARITHMS METHODS o .seal() lock properties
\u N char with unicode N \0 NUL char
n .log( x ) natural logarithm (base e) b .isSealed() sealed check
CHARACTER SETS OR ALTERNATION
n .log1p( x ) natural logarithm (1+x) o .freeze() deep immutability
n .log10( x ) base 10 logarithm [ abc ] match any charset b .isFrozen() frozen check
n .log2( x ) base 2 logarithm [^ abc ] match any unclosed charset ITERATION METHODS
ROUND METHODS a | b match a or b a .keys() list keys
n .ceil( x ) superior round (smallest) BOUNDARIES a .values() list values
n .floor( x ) inferior round (largest) ^ begin of input $ end of input a .entries() list array of array
n .fround( x ) nearest single precision \b zero-width word boundary o .fromEntries() convert entries to object
n .f16round( x ) half precision float \B zero-width non-word boundary PRIMITIVE METHODS
n .round( x ) round (nearest integer) GROUPING s .toString() convert to string
n .trunc( x ) remove fractional digits ( x ) capture group (?: x ) no capture s .toLocaleString() ↳ localization string
TRIGONOMETRIC MET . HYPERBOLIC MET . \ n reference to group n captured o .valueOf() primitive value
n .acos( x ) arccosine n .acosh( x ) QUANTIFIERS
n .asin( x ) arcsine n .asinh( x ) x * preceding x 0 or more times {0,}
I Iterator
n .atan( x ) arctangent n .atanh( x ) i .from( obj ) Create from object
x + preceding x 1 or more times {1,}
n .cos( x ) cosine n .cosh( x ) METHODS
x ? preceding x 0 or 1 times {0,1}
n .sin( x ) sine n .sinh( x ) i .drop( limit ) skip some items
x { n } x repeated n times
n .tan( x ) tangent n .tanh( x ) i .take( limit ) grab limited items
x { n ,} x repeated at least n times o .next() get next value { value, done }
n .atan2( x , y ) arctangent of ratio (x/y)
x { n , m } x repeated n - m times a .toArray() convert to array
B BigInt ASSERTIONS ARRAY METHODS
METHODS x (?= y ) x before y b .every( (e,i,a) ) test until false
b .asIntN( bits , str ) truncate to bits x (?! y ) x not before y a .filter( (e,i,a) ) make array w/true
b .asUintN( bits , str ) ↳ unsigned bits o .find( (e,i,a) ) search element
E Error a .flatMap( (e,i,a) ) map + flat(1)
J JSON PROPERTIES / .forEach( (e,i,a) ) exec for each
METHODS s .name name of error a .map( (e,i,a) ) make array
n .parse( str , (k,v) ) parse str to object s .message description of error o .reduce( (p,e,i,a) ) accumulative
n .stringify( obj , repf | wl , sp ) to str s .stack stack of error b .some( (e,i,a) ) test until true
LENGUAJEJS
TEMPORAL DATE TIMES
.COM
,, &
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

D Date legacy
( ) T Temporal
METHODS TYPES TD Temporal Duration
n .UTC( y , m , d , h , i , s , ms ) o .PlainTime hh:mm:ss TYPES
n .now() timestamp of current time o .PlainYearMonth yyyy-mm o .Duration P_Y_M_W_DT_H_M_S
n .parse( str ) convert str to timestamp o .PlainMonthDay mm-dd METHODS
n .setTime( ts ) set UNIX timestamp o .PlainDate yyyy-mm-dd o .from( date | opt ) create date obj
n .getTime() return UNIX timestamp o .PlainDateTime yyyy-mm-ddThh:nn:ss n .compare( date1 , date2 ) (-1,0,1)
UNIT GETTERS SETTERS GETUTC
/ . */.SETUTC* o .ZonedDateTime yyyy-mm-ddThh:nn:ss[z] DURATION PROPERTIES
n .get/.setFullYear( y , m , d ) (yyyy) METHODS b .blank duration is zero ?
n .get/.setMonth( m , d ) (0-11) o .from( date | opt ) create date object n .years get year (defined)
n .get/.setDate( d ) (1-31) n .compare( date1 , date2 ) (-1,0,1) n .months get months (defined)
n .get/.setHours( h , m , s , ms ) (0-23) CALC METHODS n .weeks get weeks (defined)
n .get/.setMinutes( m , s , ms ) (0-59) o .add( date | opt ) add duration to date n .days get days (defined)
n .get/.setSeconds( s , ms ) (0-59) o .subtract( date | opt ) sub dur. to date n .hours get hours (defined)
n .get/.setMilliseconds( ms ) (0-999) o .since( date | opt ) difference from date n .minutes get minutes (defined)
n .getDay() return day of week (0-6) o .until( date | opt ) difference to date n .seconds get seconds (defined)
n .getTimezoneOffset() mins (-840-840) b .equals( date | opt ) check equality n .milliseconds get millisecs
LOCALE TIMEZONE METHODS
& o .round( date | opt ) truncate date n .microseconds get microsecs
s .toLocaleDateString( locale , options ) MODIFY METHODS n .nanoseconds get nanosecs
s .toLocaleTimeString( locale , options ) o .with( d | opt ) set fields n .sign sign of duration (-1,0,1)
s .toLocaleString( locale , options ) o .withCalendar( d | opt ) set calendar DURATION METHODS
s .toUTCString() return UTC date o .withPlainTime( d | opt ) set time o .abs() get positive duration
s .toDateString() return American date o .withTimeZone( d | opt ) set timezone o .negated() invert duration (negate)
s .toTimeString() return American time CONVERT METHODS o .round( unit | opt ) truncate to unit
s .toISOString() return ISO8601 date o .toInstant() → get Instant date o .add( duration ) duration + duration
s .toJSON() return date ready for JSON o .toJSON() → serialize (ISO) o .subtract( duration ) dur1 - dur2
o .toLocaleString() → get local format o .toJSON() get JSON-format duration
Units o .toPlainDate() → PlainDate o .toLocaleString() human duration
UNITS o .toPlainDateTime() → PlainDateTime o .total( unit | opt ) calc in unit
n .year 2025 n .hour 13 o .toPlainTime() → PlainTime o .with( units ) modify units
n .month 6 n .hoursInDay 24 o .toPlainMonthDay() → PlainMonthDay
n .day 7 n .minute 30 o .toPlainYearMonth() → PlainYearMonth TI Temporal Instant
n .dayOfWeek 6 n .second 0 o .toZonedDateTime() → ZonedDateTime TYPES
n .dayOfYear 158 n .millisecond 0 TIMEZONE METHODS o .Instant yyyy-mm-ddThh:nn:ssZ
n .daysInMonth 30 n .microsecond 0 o .getTimeZoneTransition( dir | opt ) PROPERTIES
n .daysInYear 365 n .nanosecond 0 o .startOfDay( date | opt ) beginning day n .epochMilliseconds get timestamp
OTHER UNITS b .epochNanoseconds get timestamp
s .calendarId "iso8601" T Temporal Now METHODS
s .monthCode "M06" TYPES o .add( date | opt ) add duration
n .yearOfWeek 2025 o .Now get current date/time o .subtract( date | opt ) sub duration
n .monthsInYear 12 METHODS o .since( date | opt ) diff from date
n .weekOfYear 23 o .instant() → get Instant date o .until( date | opt ) diff to date
n .daysInWeek 7 o .plainDateISO() → PlainDate b .equals( date | opt ) check equality
s .era "bce" o .plainDateTimeISO() → PlainDateTime o .round( date | opt ) trunc date
n .eraYear 2022 o .plainTimeISO() → PlainTime CONVERT METHODS
b .inLeapYear false o .zonedDateTimeISO() → ZonedDateTime o .toJSON() → serialize (ISO)
TIMESTAMP PROPERTIES s .timeZoneId() get current timezone o .toLocaleString() get local format
n .epochMilliseconds 1766261720000 o .toZonedDateTime() ZonedDateTime
b .epochNanoseconds 17662617200...0n Temporal examples
TIMEZONE PROPERTIES TEMPORAL EXAMPLES CONVERT DATE TO TEMPORAL
s .timeZoneId "Europe/London" [Link]() 2026-12-20 const d = new Date(); legacy date
s .offset "+01:00" [Link]( "2026-12-20" ) [Link] date → Temporal
n .offsetNanoseconds 0 [Link]( "P2D" ) 2026-12-22 .fromEpochMilliseconds( d )
LENGUAJEJS ,,
.COM
PROMISES FETCH ESM MODULES &
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

P Promise F Fetch
STATIC METHODS METHODS
p .all( list ) wait all resolve [ ] p fetch( url | request , opt ) HTTP request XMLHttpRequest
p .allSettled( list ) wait all finish (resolve/reject) [ ] p fetchLater( url | request , opt ) deferred HTTP request
p .any( list ) wait first resolve [ 1 ✓ ]
p .race( list ) wait first finish (resolve or reject) [ ✓ ] R Request Response /

DIRECT METHODS PROPERTIES


p .withResolvers() same → new Promise((res,rej)=>...) b .ok response was successful (200-299)

E SN O P SER
p .resolve( value ) create direct resolved promise ✓ b .redirected url is redirected
p .reject( value ) create direct rejected promise ✖ n .status HTTP code error
INSTANCE METHODS s .statusText status related for code error
p .then( resolve , reject ) handle result (success) or rejected (error) s .type basic, cors, default, error...
p .then( resolve ) runs when promise is fullfilled (success) o .body content (string, FormData, Blob...)
p .catch( reject ) runs when promise is rejected (error) b .bodyUsed .body has been used
p .finally( end ) always run when finish (resolved or rejected) o .headers http header Headers or Object
ASYNC AWAIT
/
s .url absolute full http url
async function name() { ... } prepare function return promise ONLY REQUEST PROPERTIES
const data = await name() wait promise, block execution s .cache → default, reload, no-cache, no-store...
s .credentials → omit, same-origin, include
M Modules Import Export
( / ) s .destination content type → json, script, iframe...
.duplex enable request body streaming: half
TS E U Q E R

MODULES SPECIFIER s
import ... from "./file. js" ; load from relative file URL s .integrity hash integrity value (ej: sha256-...)
import ... from "name" ; bare import (node_modules/, maps...) b .isHistoryNavigation request is a history navigation
import ... from "@/name/file. js" ; alias import (vite, typescript...) b .isReloadNavigation request is a reload/refresh
import ... from "node:package" ; import built-in node package b .keepalive browser will keep request alive
s .method request HTTP method: GET, POST, HEAD...
import ... from "h ps://[Link]/file. js" ; load from absolute URL
s .mode → cors, no-cors, same-origin, navigate...
STATIC IMPORTS PRE RUNNING TIME
.redirect mode → follow, error, manual.
-

s
MAIN IMPORTS
s .referrer previous url of user navigation
import { name } from "./file. js" ; import data from module
s .referrerPolicy → no-referrer, strict-origin...
import { name as rename } from "./file. js" ; ↳ and rename
o .signal set AbortSignal to abort request
import { m1 , m2 , ... } from "./file. js" ; ↳ multiple data
METHODS
import * as name from "./file. js" ; ↳ import all in object p .arrayBuffer() → binary data as buffer (raw data)
import "./file. js" ; no import data, only run external code p .blob() → raw file-like object (store images, files...)
DEFAULT IMPORT .bytes() → return raw bytes (low-level byte handle)
TS E U Q E R

p
import name from "./file. js" ; import default data with name p .clone() → duplicate response object (reuse)
DYNAMIC IMPORT RUNNING TIME .formData() → parse form data (handle html form)
E SN O P SER

p
p import( "./file. js" ) dynamic import file (running time) p .json() → parse JSON content (json to object)
STATIC EXPORTS p .text() → return as text (plain text string)
export { m1 , m2 , ... } export multiple data (node-style) STATIC METHODS
export ... export element (prefix, direct-style) o .error() create error response (failed network requests)
export default ... export data as default import of module o .json( data , opt ) return json response (send json data)
IMPORT META o .redirect( url , code ) redirect to URL (http redirection)
s [Link] get absolute URL of module
s [Link]( name ) resolve bare import to full URL A AbortController
PROPERTIES
R Resource Modules o .signal AbortSignal object
STATIC IMPORT METHODS
import name from "./fi[Link]" with { type: "json" } parse json / .abort( reason ) abort async operation
import styles from "./fi[Link]" with { type: "css" } parse css ABORTCONTROLLER EXAMPLE
DYNAMIC IMPORTS const controller = new AbortController(); create abort
p import( "./file. json" , { with: { type: "json" }}) ↳ parse json fetch("...", { signal : controller .signal }) assign signal
p import( "./fi[Link]" , { with: { type: "css" }}) ↳ parse css [Link](); send signal to abort async operation
LENGUAJEJS
DOCUMENT DOM EVENTS
.COM
,, &
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

d document Properties
( ) s SanitizerConfig A Attr
PARSE STATIC METHODS a .elements allowed elements PROPERTIES
o .parseHTML( html , opt ) strict parse PARAMETERS s .name name of element attribute
o .parseHTMLUnsafe( html , opt ) soft parse a .elements allowed elements s .value value of element attribute
PROPERTIES a .attributes allowed attributes
s .title document title a .removeElements removed elements DTL DOM Token List
o .doctype document type header a .removeAttributes removed attributes PROPERTIES
s .characterSet doc charset .charset a .replaceWithChildrenElements unwrap n .length number of items
s .compatMode quirks or standard mode ENABLE FEATURES s .value all items concatenated
s .cookie all cookies document b .comments allow comments METHODS
s .currentScript current run script / null b .dataAttributes allow data-* b .contains( name ) item exist?
s .documentURI full URL .URL / .add( name ,...) add item to list
s .referrer previous user page d document Methods
( ) s .item( n ) get item number n
s .dir text direction METHODS / .remove( name ) delete item
s .lastModified date/time modification SEARCH FROM POINT b .toggle( name ) conmute item
LOADING STATE o .caretPositionFromPoint( x , y ) node b .replace( old , now ) replace item
b .prerendering prerender loading state e .elementFromPoint( x , y ) first element b .supports( name ) item support?
s .readyState ready state a .elementsFromPoint( x , y ) all elements / .forEach( (e,i,a) ) create iterator
API STATES s .evaluate( xpath , doc ) XPath search ITERATORS
s .visibilityState page visibility .hidden API METHODS i .keys() get names of tokens
b .fullscreenEnabled fullscreen API p .exitFullscreen() close fullscreen API i .values() get values of tokens
b .pictureInPictureEnabled PiP API p .exitPictureInPicture() close PiP API i .entries() get pair name-values
STYLES AND FONTS / .exitPointerLock() unlock pointer
o .fonts Font Loading API b .hasFocus() page is focused? S Selection
o .styleSheets style sheets ANIMATIONS PROPERTIES
a .adoptedStyleSheets adopted styles a .getAnimations() list css animations s .type selection type
ELEMENTS p .startViewTransition() animate pages s .direction selection dir
o .defaultView default view: window SEARCH DOM n .rangeCount range count
e .getElementById( id ) search first element b .isCollapsed
e .documentElement refer <html> element
a .getElementsByClassName( class ) class NODES
e .body refer <body> element
a .getElementsByName( name ) name e .baseNode base node
e .head refer <head> element
a .getElementsByTagName( tag ) <tag> NS e .anchorNode start node
e .scrollingElement current scrolling tag
e .querySelector( css ) first element e .extentNode end node
e .activeElement current focus html tag
a .querySelectorAll( css ) all elements e .focusNode focus node
FF FontFace o .getSelection() get text selection data OFFSETS
PROPERTIES STORAGE ACCESS METHODS n .baseOffset base offset
p .hasStorageAccess() n .anchorOffset start offset
n .size number of @fontface rules
p .hasUnpartitionedCookieAccess() n .extentOffset end offset
s .status loading or loaded
p .requestStorageAccess() n .focusOffset focus offset
p .ready all fonts loaded
CREATION METHODS
METHODS
e .createAttribute( name ) → Attr NS
R Range
o .add( font ) add a new font PROPERTIES
b .check( cssrule , limit ) check render font e .createDocumentFragment() → Fragment
e .createElement( tag , opt ) → Tag NS b .collapsed collapsed range
/ .clear() remove all fonts added with JS NODES
b .delete( font ) o .createRange() → Range
e .createTextNode( text ) → Text e .commonAncestorContainer
b .has( cssrule ) exist font? e .startContainer start node
p .load( cssrule , limit ) force load font e .createComment( text ) → Comment
s .adoptNode( node ) move node to outside e .endContainer end node
/ .forEach( (e,i,a) ) loop fonts OFFSETS
ITERATORS s .importNode( node , deep ) clone node
s .append( node ,...) .writeln() n .startOffset start offset
i .values() iterate fonts n .endOffset end offset
i .entries() iterate entries s .prepend( node ,...) .write()

[Link](`<div class="container"></div>`) unsafe and permissive document or fragment code


[Link](`<div class="container"></div>`) strict and safe sanitize document or fragment code
[Link](`<div class="container"></div>`, { removeElements: ["script"] }) ↳ custom options
LENGUAJEJS
ELEMENTS DOM NODES
.COM
,, &
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

E Element Properties
( ) E Element Methods
( )
DR DOMRect
PROPERTIES METHODS
PROPERTIES
s .accessKey set accessKey attribute o .animate( keyframes , time | opt )
n .x .left horizontal start position
m .attributes get attribute/value list a .getAnimations() all anims of element
n .y .top vertical start position
s .className value of class attribute b .checkVisibility() element is visible?
n .width rectangle width
o .classList classes control helper m .computedStyleMap() get computed styles
n .height rectangle height
s .id get id attribute value o .attachShadow( options ) Create Shadow DOM
n .bottom vertical end position
s .name get name attribute value b .matches( css ) check if match with css selector
n .right horizontal end position
s .tagName get uppercase tag name DOM RECT METHODS
s .localName get lowercase tag name o .getBoundingClientRect() Element DOMRect y/top ↓
s .namespaceURI namespace tag a .getClientRects() DOMRect list
←width→
s .prefix namespace prefix (xml) ATTRIBUTE METHODS x/left → right →
↕ height ↕
o .part css part control helper b .hasAttribute( name ) check if exist attrib NS
DOM HIERARCHY b .hasAttributes() check if has at least 1 attribute bottom ↓
n .childElementCount child number a .getAttributeNames() get list of attributes
a .children child element list s .getAttribute( name ) get attribute value NS N Nodes
e .firstElementChild first child / .setAttribute( name , value ) set attrib value NS PROPERTIES
e .lastElementChild last child o .getAttributeNode( name ) get Attr node NS s .baseURI document base URL
e .previousElementSibling prev tag o .setAttributeNode( a r ) set Attr node NS s .nodeName tag uppercase name
e .nextElementSibling next tag b .toggleAttribute( name , force ) add/del attrib n .nodeType node kind
SHADOW DOM / .removeAttribute( name ) delete attribute NS a .childNodes all children
o .shadowRoot get shadow DOM SCROLL METHODS o .firstChild first child node
s .slot get name slot / .scrollBy( x , y ) / .scrollBy( opt ) relative o .lastChild last child node
e .assignedSlot get <slot> / .scrollTo( x , y ) / .scrollTo( opt ) absolute o .previousSibling prev node
ELEMENT SIZE POS
/ ELEMENT SCROLL / .scrollIntoView( top | opt ) visual scroll o .nextSibling next node
s .clientWidth s .scrollWidth / .scrollIntoViewIfNeeded( center ) ↳ conditional o .ownerDocument document root
s .clientHeight s .scrollHeight SEARCH CHILD ELEMENTS e .parentElement parent tag
s .clientTop s .scrollTop a .getElementsByClassName( class ) find by class e .parentNode parent node
s .clientLeft s .scrollLeft a .getElementsByTagName( tag ) find by tag NS b .isConnected inserted in DOM?
s .currentCSSZoom css zoom value e .querySelector( css ) first tag match by css s .textContent node text value
HTML PROPERTIES a .querySelectorAll( css ) all tags match by css METHODS
s .innerHTML get/set html code SEARCH PARENT ELEMENTS e .cloneNode( deep ) clone tree
s .outerHTML ↳ with wrapper tag e .closest( css ) first ancestor match by css e .getRootNode( opt ) root parent
MODERN HTML METHODS .INNERHTML ELEMENT API b .contains( node ) check node
s .getHTML( opt ) get html code / .after( node ,...) insert node after element b .hasChildNodes() has children
/ .setHTML( html , opt ) safe html / .append( node ,...) insert node as child at end b .isEqualNode( node ) content
/ .setHTMLUnsafe( html , opt ) / .before( node ,...) insert node before element b .isSameNode( node ) node
/ .prepend( node ,...) insert node as child at start s .lookupNamespaceURI( prefix )
SO Shadow Options / .remove() remove element from document s .lookupPrefix( namespace )
PROPERTIES REPLACE CHILD ELEMENT API
/ / .normalize() merge text nodes
s .mode "open" or "closed" / .replaceChildren( node ,...) replace child NODE API
b .clonable with .cloneNode() / .replaceWith( node ,...) replace node element e .appendChild( node ) add node
b .delegatesFocus focus inside / .moveBefore( child , target ) → before target e .removeChild( node ) del node
b .serializable included in export ADJACENT API e .replaceChild( new , old )
s .slotAssignment how slot match / .insertAdjacentHTML( pos , html ) insert html e .insertBefore( new , ref )
/ .insertAdjacentElement( pos , el ) insert elem
SD Shadow DOM / .insertAdjacentText( pos , text ) insert textnode P Position
SHADOW DOM CREATION API METHODS PROPERTIES
const options = { mode: "open" } / .setPointerCapture( id ) capture all event s "beforebegin" [ ]
[Link]( options ); b .hasPointerCapture( id ) element captured? s "afterbegin" [ ]
ELEMENTS / .releasePointerCapture( id ) release capture s "beforeend" [ ]
element main DOM (hidden) p .requestPointerLock( opt ) infinite mouse moves s "afterend" [ ]
[Link] shadow DOM p .requestFullscreen( opt ) enable fullscreen
LENGUAJEJS ,,
.COM
LANGUAGE TIMERS URL GLOBALS ,, &
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

Main Javascript details U URL


DATA STRUCTURES METHODS
const constant variable (no reassign) https:// user : 1234 @ sub. manz. dev :80 /path / [Link] #anchor :~:text=word
let variable (block scope) var URL
using auto-dispose variable s .protocol https: s .hostname [Link]
class Name extends Base ... sugar syntax s .username user s .host [Link]
super base class this ref this class new instance s .password 1234 s .origin [Link]
o structuredClone( struct , opt ) deep clone s .port 80 s .pathname /path/[Link]
CONDITIONALS s .hash #anchor s .search full query string parameters
if ... / else if ... / else ... s .href absolute full URL o .searchParams query string object helper
switch ... / case ... / default ... URL SEARCH PARAMS PROPERTIES METHODS
&

condition ? A : B ternary operator n .size total parameters / .append( n , v ) add ITERATORS


FUNCTIONS b .has( name ) exist param? / .delete( name ) delete i .keys()
function name(a = 1) ... default parameter value s .get( name ) get param a .getAll( name ) multiple i .values()
function name(...a) ... rest argument (spread) / .sort() sort params / .set( n , v ) set param i .entries()
const name = (a) => ... fat arrow (no this)
/ .forEach( (v,n,o) ) iterate query string parameters
LOOPS
for ( start , condition , incr ) traditional loop G Globals C Console
for ( item in array ) loop keys REFERENCE METHODS
for ( item of array ) loop values globalThis ref this window = window LOG LEVEL METHODS
while ( condition ) ... repeat loop PROPERTIES / .log( str | obj ) show message
do ... while ( condition ) ↳ always iteration #0 SIZES / .info( str | obj ) ↳ info message
OPERATORS n .innerWidth n .innerHeight / .warn( str | obj ) ↳ warning msg
! Logical NOT !false → true n .outerWidth n .outerHeight / .error( str | obj ) ↳ error msg
&& Logical AND true && "manz" → "manz" SCREEN SCROLL
& PERFORMANCE METHODS
|| Logical OR 0 || "manz" → "manz" o .visualViewport .screen data / .profile( name ) start profile
?? nullish coalescing 0 ?? "manz" → 0 n .screenX .screenLeft X offset / .profileEnd( name ) stop profile
||= logical OR assign A ||= B → A = A || B n .screenY .screenTop Y offset / .time( name ) start benchmark
??= nullish assign A ??= B → A = A ?? B n .scrollX quantity horizontal scroll / .timeEnd( name ) stop benchmark
?. Optional A?.life → A && [Link] n .scrollY quantity vertical scroll OTHERS
NUMBER SYSTEM OTHERS / .assert( cond , str | obj ...) test
42 → 42 (decimal) 0b 0b10 → 2 (binary) b .closed is this window closed? / .count( str ) count number times
0o 0o20 → 16 (octal) 0x 0x32 → 50 (hexadecimal) o .crypto cryptographic services / .dir( obj ) extended prop debug
TIPS o .location current URL information / .group() open new group
`string ${a}` string template (variables + multiline) o .navigator data & API browser / .groupCollapsed() ↳ collapsed
o .caches cache storage control API / .groupEnd() close previous group
T Timers METHODS / .table( array | obj , cols ) format
METHODS CLASSIC / .trace() show code trace
BASIC / .alert( msg ) show message / .timeStamp( str ) put on timeline
n setTimeout( function , time ) run after time ms b .confirm( msg ) show question
/ clearTimeout( id ) cancel timer with id s .prompt( msg , def ) asks text C Crypto
n setInterval( function , time ) run every time ms / .print() show printer dialog METHODS
/ clearInterval( id ) cancel timer with id o .open( url , target , opt ) o .getRandomValues( typedarray )
HIGH PERFORMANCE / .close() close window s .randomUUID() generate unique id
n requestAnimationFrame( function ) run auto / .focus() focus window o .subtle ↴
/ cancelAnimationFrame( id ) cancel timer w/ id s .atob( base64 ) → to binary SUBTLE
n requestIdleCallback( function , opt ) when idle s .btoa( binary ) → to base64 METHODS
/ cancelIdleCallback( id ) cancel timer with id OTHERS p .encrypt() p .decrypt()
o .createImageBitmap( img , opt ) p .deriveBits() p .deriveKey()
S Symbol p .getScreenDetails() screen data p .generateKey() p .digest()
METHODS o .getSelection() get selected text p .importKey() p .exportKey()
p .for( key ) create symbol from key (global) o .matchMedia( MQ ) check MQ p .wrapKey() p .unwrapKey()
s .keyFor( sym ) search key from symbol o .getComputedStyle( el , pseudo ) p .sign() p .verify()
LENGUAJEJS
EVENTS LOCALES STORAGE
,,
.COM
&
&

Created by @Manz [Link]


( ) https lenguajejs com
:// . /

E EventTarget EventList I Intl


METHODS EVENT NAMES INTL API OBJECTS
/ .addEventListener( name , (ev) , opt ) click o .NumberFormat( code , opt ) number format
/ .removeEventListener( name , (ev) , opt ) dblclick o .DateTimeFormat( code , opt ) date/time
b .dispatchEvent( event ) mousedown o .DurationFormat( code , opt ) duration
EVENTLISTENER OPTIONS mouseup o .RelativeTimeFormat( code , opt ) reltime
b .capture dispatched DOM (parent → child) false mousemove o .ListFormat( code , opt ) locale list data

ESUOM
b .once only one-time event false mouseenter o .Collator( code , opt ) string comparator
b .passive never call .preventDefault() false mouseleave o .DisplayNames( code , opt ) locale names
o .signal set AbortSignal to remove listener mouseleave o .PluralRules( code , opt ) plural categories

RETNIOP ESUOM
mouseover o .Segmenter( code , opt ) text segmentation
E Event CustomEvent
/ mouseout o .Locale( code , opt ) locale identifier object
PROPERTIES contextmenu METHODS
/

s .type name of event pointerdown o .resolvedOptions() locale and data details


b .bubbles later, event move (child → parents) false pointerup FORMATTING METHODS
b .cancelable event is cancelable? false pointermove s .format( n ) locale format number
RETNIOP

b .composed can pass through shadow dom false pointerenter a .formatToParts( n ) ↳ to array
b .defaultPrevented action already prevented false pointerleave RANGE METHODS ONLY NUMBER DATETIME &

o .detail additional event info, only CustomEvent pointerover s .formatRange( start , end ) range
n .eventPhase current event stage (0-3) pointerout a .formatRangeToParts( start , end ) ↳ split
b .isTrusted user action or dispatched false pointercancel COLLATOR METHODS
o .currentTarget active listener element null wheel n .compare( str1 , str2 ) compares two strings
RCS

o .target event origin element scroll DISPLAYNAMES METHODS


n .timeStamp time when was created keydown s .of( code ) return locale name
BY E K P I L C

METHODS keyup PLURALRULES METHODS


H C U OT DRAO BYEK

a .composedPath() element list (propagation path) keypress s .select( n ) get plural name
/ .preventDefault() cancel default event action copy s .selectRange( start , end ) get plural ranges
/ .stopImmediatePropagation() stop all listeners cut SEGMENTER METHODS
/

/ .stopPropagation() stop event bubbling paste o .segment( str ) locale segments string
o .when( name , opt ) create ev. stream Observable touchstart LOCALES METHODS
H C U OT

touchmove a .getCalendars() o .getTextInfo()


O Observable API touchend a .getCollations() o .minimize()
METHODS touchcancel a .getTimeZones() o .maximize()
ARRAY LIKE METHODS drag dragstart a .getHourCycles() o .getWeekInfo()
P OR D GAR D

b .every( (expr) ) b .some( (expr) ) dragend a .getNumberingSystems()


a .filter( (expr) ) o .find( (expr) ) dragenter
S Local Session Storage
&

/ .forEach( (expr) ) a .map( (expr) ) dragleave /

a .flatMap( (expr) ) o .reduce( (acc, start) ) dragover drop PROPERTIES


OBSERVABLE METHODS focus blur n .length number of items in storage
.subscribe( observer , opt ) consume emitted ev. METHODS
SMR OF

o focusin reset
o .take( n ) process only first n o .first() focusout input s .key( n ) get key name on position n
o .takeUntil( expr ) process to n o .last() change submit s .getItem( key ) get value of key key
o .drop( n ) ignore first n items a .toArray() animationstart / .setItem( key , value ) set value
o .switchMap( func ) switch to new stream animationend / .removeItem( key ) remove key
SN O I TA M I NA

o .inspect( (expr) ) peek values/debug animationiteration / .clear() remove all items (current site)
ERRORS METHODS transitionstart
o .catch( f ) handle errors o .finally( f ) cleanup transitionend G GeneratorFunction
transitionrun EXAMPLE { VALUE : ..., DONE FALSE
: }

B BroadcastChannel API transitioncancel function* gen() { const fg = gen();


PROPERTIES load unload yield 1; [Link](); // 1
SR E H TO

s .name name of the channel beforeunload yield 2; [Link](); // 2


METHODS error resize yield 3; [Link](); // 3
/ .postMessage( msg ) send data / .close( msg ) DOMContentLoaded } [Link](); // undefined

You might also like