file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
javascript/reference/global_objects/typedarray/map/index.md
JavaScript - Global Objects - TypedArray - map: The `map()` method of `TypedArray` instances creates a new typed array populated with the results of calling a provided function on every element in the calling typed array. This method has the same algorithm as `Array.prototype.map()`. Example: const uint8 = new Uint8...
[ 0.25708919763565063, -0.9607402086257935, -1.3811686038970947, 0.5218027830123901, 0.04907437786459923, -0.9550485610961914, -0.4973762035369873, 0.6391415596008301, -0.6466583013534546, 0.8199931383132935, -0.18227127194404602, 0.4472999572753906, 0.30285221338272095, 0.17401628196239471,...
javascript/reference/global_objects/typedarray/map/index.md
JavaScript - Global Objects - TypedArray - map - Syntax: Example: map(callbackFn) map(callbackFn, thisArg)
[ 0.08816248178482056, 0.40943974256515503, -0.5886231064796448, -0.3091389834880829, -0.7912033200263977, -1.7726831436157227, 1.0594840049743652, 0.8994959592819214, -0.7662093043327332, 0.16482536494731903, -0.27256202697753906, 0.4559357762336731, -0.3159903883934021, 0.7032530903816223,...
javascript/reference/global_objects/typedarray/map/index.md
JavaScript - Global Objects - TypedArray - map - Syntax - Parameters: - `callbackFn`: A function to execute for each element in the typed array. Its return value is added as a single element in the new typed array. The function is called with the following arguments: - `element`: The current element being processed ...
[ -0.11878766864538193, -0.16098803281784058, -1.3034065961837769, 0.2715323269367218, -0.2902580201625824, -1.3603384494781494, 1.2918188571929932, 0.563753604888916, -0.7715219855308533, 0.5699241161346436, -0.5889583826065063, 0.39726775884628296, -0.893496572971344, 1.4653247594833374, ...
javascript/reference/global_objects/typedarray/map/index.md
JavaScript - Global Objects - TypedArray - map - Syntax - Return value: A new typed array with each element being the result of the callback function.
[ 0.38126474618911743, -0.42342254519462585, -1.4923593997955322, -0.18606050312519073, -0.5198647975921631, -0.8942678570747375, 0.41385719180107117, 1.1803773641586304, -0.3653387725353241, 0.3554791212081909, -0.36698830127716064, 0.6936377286911011, 0.04441201314330101, 0.830741941928863...
javascript/reference/global_objects/typedarray/map/index.md
JavaScript - Global Objects - TypedArray - map - Description: See `Array.prototype.map()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.08909736573696136, -0.044775113463401794, -0.5709965825080872, 0.1257060021162033, -0.12742416560649872, -0.9423090219497681, 0.20809414982795715, 0.7702161073684692, -0.31788885593414307, 0.24235258996486664, -0.36434251070022583, 0.11399798840284348, 0.5627185702323914, -0.14074054360...
javascript/reference/global_objects/typedarray/map/index.md
JavaScript - Global Objects - TypedArray - map - Examples - Mapping a typed array to a typed array of square roots: The following code takes a typed array and creates a new typed array containing the square roots of the numbers in the first typed array. Example: const numbers = new Uint8Array([1, 4, 9]); const roots...
[ 0.12624035775661469, 0.04815246909856796, -1.2483757734298706, 0.3412621021270752, 0.02126188576221466, -1.3956074714660645, 0.1477358192205429, 0.3301739990711212, -0.4528833031654358, 0.14936049282550812, -0.16059842705726624, 0.6318557858467102, -0.15084674954414368, -0.3514372408390045...
javascript/reference/global_objects/typedarray/map/index.md
JavaScript - Global Objects - TypedArray - map - Examples - Mapping a typed array of numbers using a function containing an argument: The following code shows how `map()` works when a function requiring one argument is used with it. The argument will automatically be assigned to each element of the typed array as `map...
[ -0.23908230662345886, -0.0946553498506546, -1.1889523267745972, 0.8144986629486084, 0.017187979072332382, -1.5972331762313843, 0.5263837575912476, 0.020847022533416748, -0.8632005453109741, 0.6501080393791199, -0.11406722664833069, 0.3185374140739441, 0.36555200815200806, -0.02600186504423...
javascript/reference/global_objects/typedarray/reverse/index.md
JavaScript - Global Objects - TypedArray - reverse: The `reverse()` method of `TypedArray` instances reverses a typed array in place and returns the reference to the same typed array, the first typed array element now becoming the last, and the last typed array element becoming the first. In other words, elements orde...
[ -0.3166976571083069, -0.30207160115242004, -1.0856565237045288, 0.5807268619537354, -0.15935204923152924, -0.33203399181365967, 0.014677201397716999, 1.230574369430542, -0.255262553691864, 0.898890495300293, -0.3004797101020813, 0.3345223665237427, 0.19836780428886414, -0.01642610132694244...
javascript/reference/global_objects/typedarray/reverse/index.md
JavaScript - Global Objects - TypedArray - reverse - Syntax: Example: reverse()
[ 0.002357249613851309, 0.31312093138694763, -0.6910151243209839, -0.0016119140200316906, -0.5013074278831482, -1.0021270513534546, 0.653494119644165, 1.3541301488876343, -0.36978092789649963, 0.19102588295936584, -0.6042787432670593, 0.20027977228164673, -0.13347148895263672, -0.03033698536...
javascript/reference/global_objects/typedarray/reverse/index.md
JavaScript - Global Objects - TypedArray - reverse - Syntax - Parameters: None.
[ 0.05065784975886345, 0.26325902342796326, -0.8950494527816772, -0.5297845005989075, -0.4960472285747528, -0.8215380311012268, 0.8114030957221985, 1.399355173110962, -0.40674734115600586, 0.058418042957782745, -1.0023777484893799, -0.39211422204971313, 0.19596828520298004, -0.14501209557056...
javascript/reference/global_objects/typedarray/reverse/index.md
JavaScript - Global Objects - TypedArray - reverse - Syntax - Return value: The reference to the original typed array, now reversed. Note that the typed array is reversed in place, and no copy is made.
[ -0.2403646856546402, 0.28253647685050964, -0.9191697835922241, 0.3299291729927063, -0.4297281503677368, -1.201297402381897, 0.844147801399231, 1.586071491241455, 0.18907247483730316, 0.33747419714927673, -0.7476542592048645, 0.5684533715248108, -0.1424436867237091, 0.33470362424850464, -...
javascript/reference/global_objects/typedarray/reverse/index.md
JavaScript - Global Objects - TypedArray - reverse - Description: See `Array.prototype.reverse()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.39544153213500977, 0.21213312447071075, -0.39633119106292725, 0.34611544013023376, -0.2965151369571686, -0.8126236200332642, 0.32946547865867615, 1.039270043373108, -0.18713173270225525, 0.3242102265357971, -1.0207349061965942, 0.32390058040618896, 0.3863641321659088, -0.159782052040100...
javascript/reference/global_objects/typedarray/reverse/index.md
JavaScript - Global Objects - TypedArray - reverse - Examples - Using reverse(): Example: const uint8 = new Uint8Array([1, 2, 3]); uint8.reverse(); console.log(uint8); // Uint8Array [3, 2, 1]
[ -0.5025333762168884, -0.0802919864654541, -1.0079562664031982, 0.6117887496948242, -0.168675035238266, -0.7880077958106995, -0.37622153759002686, 0.5755230784416199, -0.345003604888916, 0.406920462846756, -0.7001680135726929, 0.40078091621398926, 0.43768075108528137, -0.323299378156662, ...
javascript/reference/global_objects/typedarray/copywithin/index.md
JavaScript - Global Objects - TypedArray - copyWithin: The `copyWithin()` method of `TypedArray` instances shallow copies part of this typed array to another location in the same typed array and returns this typed array without modifying its length. This method has the same algorithm as `Array.prototype.copyWithin()`....
[ -0.3292630612850189, -0.17272327840328217, -1.266979694366455, 0.20464056730270386, 0.2971836030483246, -0.012909631244838238, -0.7634172439575195, 0.6572777032852173, -0.3843998908996582, 0.12048842012882233, -0.23498375713825226, 0.22743314504623413, 0.5073180198669434, -0.24228313565254...
javascript/reference/global_objects/typedarray/copywithin/index.md
JavaScript - Global Objects - TypedArray - copyWithin - Syntax: Example: copyWithin(target, start) copyWithin(target, start, end)
[ 0.20208631455898285, 0.3837714195251465, -1.0057541131973267, 0.16342417895793915, -0.2723800539970398, -0.7595203518867493, -0.5668694972991943, 0.7322725057601929, -0.2221526801586151, -0.43972766399383545, -0.13297849893569946, -0.22427652776241302, -0.13889636099338531, -0.778377473354...
javascript/reference/global_objects/typedarray/copywithin/index.md
JavaScript - Global Objects - TypedArray - copyWithin - Syntax - Parameters: - `target`: Zero-based index at which to copy the sequence to, converted to an integer. This corresponds to where the element at `start` will be copied to, and all elements between `start` and `end` are copied to succeeding indices. - `start`...
[ -0.004111547023057938, 0.38567662239074707, -1.0272650718688965, 0.31190064549446106, 0.35046374797821045, -0.43652990460395813, -0.17479047179222107, 0.17912308871746063, -0.4297485649585724, -0.17236994206905365, -0.7034585475921631, -0.256320983171463, -0.06643934547901154, -0.326619237...
javascript/reference/global_objects/typedarray/copywithin/index.md
JavaScript - Global Objects - TypedArray - copyWithin - Syntax - Return value: The modified typed array.
[ 0.09075041115283966, -0.1333976686000824, -0.853299617767334, 0.13679857552051544, -0.08939304947853088, -1.1293717622756958, 0.2374485582113266, 1.432854175567627, -0.22398892045021057, -0.0014108133036643267, -0.4199114739894867, 0.35731661319732666, -0.3056786358356476, 0.18172478675842...
javascript/reference/global_objects/typedarray/copywithin/index.md
JavaScript - Global Objects - TypedArray - copyWithin - Description: See `Array.prototype.copyWithin()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.17368187010288239, 0.3285694718360901, -0.9173119068145752, 0.7334875464439392, 0.19261394441127777, -0.45651867985725403, -0.4181106686592102, 0.8480830788612366, -0.30781710147857666, 0.018941855058073997, -0.7064250707626343, 0.16853506863117218, 0.7003978490829468, -0.56499397754669...
javascript/reference/global_objects/typedarray/copywithin/index.md
JavaScript - Global Objects - TypedArray - copyWithin - Examples - Using copyWithin(): Example: const buffer = new ArrayBuffer(8); const uint8 = new Uint8Array(buffer); uint8.set([1, 2, 3]); console.log(uint8); // Uint8Array [ 1, 2, 3, 0, 0, 0, 0, 0 ] uint8.copyWithin(3, 0, 3); console.log(uint8); // Uint8Array [ 1, ...
[ -0.27293094992637634, -0.056346453726291656, -1.4147180318832397, 0.77447110414505, 0.035850513726472855, -0.7024590373039246, -0.8817250728607178, 0.6383275985717773, -0.2033042460680008, -0.13118483126163483, -0.5984482765197754, 0.3202284276485443, 0.8898330330848694, -0.565707206726074...
javascript/reference/global_objects/typedarray/length/index.md
JavaScript - Global Objects - TypedArray - length: The `length` accessor property of `TypedArray` instances returns the length (in elements) of this typed array. Example: // Create an ArrayBuffer with a size in bytes const buffer = new ArrayBuffer(8); const uint8 = new Uint8Array(buffer, 2); console.log(uint8.lengt...
[ -0.24192871153354645, -0.6679307818412781, -1.5370643138885498, 0.5737388730049133, -0.6169501543045044, -0.5297808051109314, -0.8518514633178711, 0.4466385245323181, -0.01690804585814476, 0.08104664832353592, -0.6638078093528748, 0.5446534752845764, -0.05127181112766266, 0.379612922668457...
javascript/reference/global_objects/typedarray/length/index.md
JavaScript - Global Objects - TypedArray - length - Description: The `length` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. If the typed array is length-tracking, then its length depends on the length of the underlying buffer, and may change ...
[ -1.3400006294250488, -0.6515094637870789, -1.128461241722107, 0.4592897891998291, -0.3700440227985382, -1.2412489652633667, -0.2176561802625656, 0.671903669834137, 0.15774960815906525, -0.2711087465286255, -0.7871176600456238, 0.031296730041503906, -0.48304057121276855, 0.13900533318519592...
javascript/reference/global_objects/typedarray/length/index.md
JavaScript - Global Objects - TypedArray - length - Examples - Using the length property: Example: const buffer = new ArrayBuffer(8); const uint8 = new Uint8Array(buffer); uint8.length; // 8 (matches the length of the buffer) const uint8newLength = new Uint8Array(buffer, 1, 5); uint8newLength.length; // 5 (as speci...
[ -0.32087403535842896, -0.7137962579727173, -1.5688775777816772, 0.37206733226776123, -0.4556306004524231, -1.038123607635498, -0.674605667591095, 0.2503870129585266, 0.020834898576140404, 0.08873055875301361, -0.7745324969291687, 0.7687216401100159, 0.06627355515956879, 0.0558583028614521,...
javascript/reference/global_objects/typedarray/values/index.md
JavaScript - Global Objects - TypedArray - values: The `values()` method of `TypedArray` instances returns a new array iterator object that iterates the value of each item in the typed array. This method has the same algorithm as `Array.prototype.values()`. Example: const bytes = new Uint8Array([10, 20, 30, 40, 50])...
[ 0.16623546183109283, -0.9726873636245728, -0.9215593338012695, 0.6053372621536255, 0.34173521399497986, -0.5140019059181213, -0.28623783588409424, 1.0768612623214722, -0.3924582600593567, 0.2954716682434082, 0.24170204997062683, 0.7333793044090271, 0.2615491449832916, 0.030867520719766617,...
javascript/reference/global_objects/typedarray/values/index.md
JavaScript - Global Objects - TypedArray - values - Syntax: Example: values()
[ 0.26382556557655334, -0.4234849214553833, -1.0732672214508057, -0.05576680228114128, -0.7382280230522156, -1.1565297842025757, 0.6945766806602478, 1.1539947986602783, -0.23490971326828003, -0.599837064743042, 0.1938110888004303, 0.4539330303668976, 0.19806954264640808, -0.16338644921779633...
javascript/reference/global_objects/typedarray/values/index.md
JavaScript - Global Objects - TypedArray - values - Syntax - Parameters: None.
[ 0.0918608233332634, 0.12291371822357178, -1.2126069068908691, -0.6475874781608582, -0.44788357615470886, -0.8009033203125, 0.7021637558937073, 1.4490879774093628, -0.3890687823295593, -0.5631633996963501, -0.4654749631881714, -0.6602650284767151, 0.12462946027517319, -0.15861564874649048, ...
javascript/reference/global_objects/typedarray/values/index.md
JavaScript - Global Objects - TypedArray - values - Syntax - Return value: A new iterable iterator object.
[ 0.0929039940237999, -0.18816834688186646, -0.8604047894477844, -0.1799214482307434, -0.39108970761299133, -1.0747753381729126, -0.10312400758266449, 1.6529607772827148, -0.07216612994670868, 0.13886478543281555, -0.4248413145542145, 0.2986392676830292, -0.13442105054855347, 0.7196778655052...
javascript/reference/global_objects/typedarray/values/index.md
JavaScript - Global Objects - TypedArray - values - Description: See `Array.prototype.values()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.06525369733572006, -0.07208040356636047, -0.5320967435836792, 0.29710766673088074, -0.3393380045890808, -0.7142928838729858, 0.4427530765533447, 1.0304168462753296, -0.25254368782043457, -0.14191950857639313, -0.37258267402648926, 0.22975729405879974, 0.6514478921890259, -0.379129648208...
javascript/reference/global_objects/typedarray/values/index.md
JavaScript - Global Objects - TypedArray - values - Examples - Iteration using for...of loop: Example: const arr = new Uint8Array([10, 20, 30, 40, 50]); const values = arr.values(); for (const n of values) { console.log(n); }
[ -0.2369735836982727, -0.4169912040233612, -0.5553110837936401, 0.8645828366279602, -0.32409095764160156, -0.9540684819221497, -0.11952047049999237, 0.4405905306339264, -0.4497871696949005, 0.26154953241348267, 0.7221376895904541, 0.4827125072479248, -0.19942589104175568, 0.3208859860897064...
javascript/reference/global_objects/typedarray/values/index.md
JavaScript - Global Objects - TypedArray - values - Examples - Alternative iteration: Example: const arr = new Uint8Array([10, 20, 30, 40, 50]); const values = arr.values(); console.log(values.next().value); // 10 console.log(values.next().value); // 20 console.log(values.next().value); // 30 console.log(values.next(...
[ 0.01608462445437908, -0.6621832847595215, -0.652427077293396, 0.2735390067100525, -0.2682117223739624, -1.0703204870224, -0.5135113000869751, 0.5022491812705994, -0.1882224977016449, 0.3011454939842224, 0.7306360602378845, 0.7674765586853027, -0.09095368534326553, 0.14126554131507874, -0...
javascript/reference/global_objects/typedarray/includes/index.md
JavaScript - Global Objects - TypedArray - includes: The `includes()` method of `TypedArray` instances determines whether a typed array includes a certain value among its entries, returning `true` or `false` as appropriate. This method has the same algorithm as `Array.prototype.includes()`. Example: const uint8 = ne...
[ -0.6719067692756653, -1.3661279678344727, -1.0391398668289185, 0.9340776801109314, 0.06043299660086632, -0.8958515524864197, 0.22321586310863495, 0.12479471415281296, -0.20646579563617706, 0.763372004032135, -0.09437792748212814, 0.18471787869930267, 0.5524336099624634, -0.3898315131664276...
javascript/reference/global_objects/typedarray/includes/index.md
JavaScript - Global Objects - TypedArray - includes - Syntax: Example: includes(searchElement) includes(searchElement, fromIndex)
[ -0.6868342757225037, -0.20446830987930298, -0.833134651184082, 0.23627737164497375, -0.37212812900543213, -1.0776841640472412, -0.012566253542900085, 0.08673819899559021, -0.3989163637161255, -0.5429546236991882, -0.1699938029050827, 0.1655244380235672, -0.24841009080410004, -0.44984453916...
javascript/reference/global_objects/typedarray/includes/index.md
JavaScript - Global Objects - TypedArray - includes - Syntax - Parameters: - `searchElement`: The value to search for. - `fromIndex` (optional): Zero-based index at which to start searching, converted to an integer.
[ -0.24409529566764832, -0.006802892778068781, -0.6580733060836792, 0.30338823795318604, 0.13600023090839386, -0.6711992025375366, 0.4788547158241272, 0.2912404537200928, -0.1994921714067459, -0.41642436385154724, -0.5524548888206482, 0.018793456256389618, -0.535552978515625, -0.201772913336...
javascript/reference/global_objects/typedarray/includes/index.md
JavaScript - Global Objects - TypedArray - includes - Syntax - Return value: A boolean value which is `true` if the value `searchElement` is found within the typed array (or the part of the typed array indicated by the index `fromIndex`, if specified).
[ -0.9074609875679016, -0.242658331990242, -0.8659805655479431, 0.7128341197967529, -0.3797576129436493, -0.8628302216529846, 0.5959957242012024, 0.4696124494075775, -0.3226549029350281, -0.3119905889034271, -0.25683361291885376, 0.5059842467308044, 0.15439628064632416, 0.025655843317508698,...
javascript/reference/global_objects/typedarray/includes/index.md
JavaScript - Global Objects - TypedArray - includes - Description: See `Array.prototype.includes()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.30344119668006897, -0.13409662246704102, -0.5324392914772034, 0.6727808117866516, -0.11282272636890411, -0.6733174920082092, 0.32843300700187683, 0.474087119102478, -0.21648873388767242, 0.2722597122192383, -0.4066498875617981, 0.13670237362384796, 0.5193356871604919, -0.385917603969574...
javascript/reference/global_objects/typedarray/includes/index.md
JavaScript - Global Objects - TypedArray - includes - Examples - Using includes(): Example: const uint8 = new Uint8Array([1, 2, 3]); uint8.includes(2); // true uint8.includes(4); // false uint8.includes(3, 3); // false // NaN handling (only relevant for floating point arrays) new Uint8Array([NaN]).includes(NaN); // ...
[ -0.6650876998901367, -0.28563159704208374, -1.0343352556228638, 1.1816462278366089, -0.09548871964216232, -1.001028060913086, -0.18749666213989258, 0.7159451246261597, -0.7462462782859802, 0.8859442472457886, -0.21416029334068298, 0.0395607128739357, 0.610596776008606, -0.6217056512832642,...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from: The `TypedArray.from()` static method creates a new typed array from an array-like or iterable object. This method is nearly the same as `Array.from()`. Example: const uint16 = Int16Array.from("12345"); console.log(uint16); // Expected output: Int16Array [1, 2, 3, 4,...
[ 0.32776862382888794, -0.647952675819397, -1.0502653121948242, 0.36426278948783875, 0.36413443088531494, -0.7630185484886169, -0.04989398643374443, 1.1753734350204468, -0.20768429338932037, 0.5222058296203613, -0.35645946860313416, 0.3231907784938812, -0.4426788091659546, -0.356072336435318...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Syntax: Example: TypedArray.from(arrayLike, mapFn) TypedArray.from(arrayLike, mapFn, thisArg) Where `TypedArray` is one of: - `Int8Array` - `Uint8Array` - `Uint8ClampedArray` - `Int16Array` - `Uint16Array` - `Int32Array` - `Uint32Array` - `Float16Array` - `Float32Ar...
[ -0.367988646030426, -0.30739787220954895, -0.39238864183425903, -0.10406448692083359, 0.4125642478466034, -1.1976319551467896, 0.061819542199373245, 0.7947705984115601, -0.0010486510582268238, 0.5322030186653137, -0.1373627632856369, -0.30203619599342346, -0.26595157384872437, 0.3022296428...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Syntax - Parameters: - `arrayLike`: An iterable or array-like object to convert to a typed array. - `mapFn` (optional): A function to call on every element of the typed array. If provided, every value to be added to the array is first passed through this function, and ...
[ -0.085484579205513, -0.28399792313575745, -0.7817625999450684, 0.3364880681037903, 0.064309261739254, -1.1599907875061035, 0.5624746680259705, 0.48051372170448303, -0.05817412957549095, 0.1638556718826294, -0.5360403656959534, 0.26248109340667725, -1.1632980108261108, 0.6320372819900513, ...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Syntax - Return value: A new `TypedArray` instance.
[ 0.5671672224998474, -0.4767206907272339, -0.8701492547988892, -0.49264657497406006, -0.49787652492523193, -0.9163473844528198, 0.16511815786361694, 1.398358941078186, -0.02187160588800907, 0.32752591371536255, 0.02561180293560028, -0.3077087104320526, -0.2472134530544281, 0.710824310779571...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Description: See `Array.from()` for more details. There are some subtle distinctions between `Array.from()` and `TypedArray.from()` (note: the `this` value mentioned below is the `this` value that `TypedArray.from()` was called with, not the `thisArg` argument used to...
[ -0.09204331040382385, 0.2107047289609909, -0.3376099169254303, 0.7994680404663086, 1.0334832668304443, -0.9034653902053833, 0.12273047119379044, 1.415183663368225, -0.1391773670911789, 0.6446354985237122, -0.14117896556854248, 0.3588573634624481, -0.13092097640037537, 0.6617162227630615, ...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Examples - From an iterable object (Set): Example: const s = new Set([1, 2, 3]); Uint8Array.from(s); // Uint8Array [ 1, 2, 3 ]
[ 0.16031138598918915, -0.20675237476825714, -0.9314675331115723, 0.40133053064346313, -0.09753990918397903, -1.7636066675186157, -0.8964108824729919, 0.9302777051925659, -0.41981083154678345, 0.19853611290454865, -0.39766860008239746, 0.20550812780857086, -0.1744532287120819, -0.12522786855...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Examples - From a string: Example: Int16Array.from("123"); // Int16Array [ 1, 2, 3 ]
[ 0.14756575226783752, -0.11390892416238785, -0.7121334671974182, -0.6624499559402466, -0.007303181104362011, -1.1653273105621338, 0.4740115702152252, 0.5421227216720581, -0.5387696027755737, -0.25937825441360474, -0.26683759689331055, 0.10364712029695511, -0.6270875334739685, -0.24622520804...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Examples - Use with arrow function and map: Using an arrow function as the map function to manipulate the elements Example: Float32Array.from([1, 2, 3], (x) => x + x); // Float32Array [ 2, 4, 6 ]
[ 0.039120130240917206, -0.19362685084342957, -1.1625219583511353, 0.13340239226818085, -0.1769472062587738, -1.5030004978179932, 0.5952094197273254, 0.9669001698493958, -0.41770631074905396, 0.07154779136180878, -0.09747529029846191, -0.300601065158844, -0.11908464133739471, -0.312183886766...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Examples - Generate a sequence of numbers: Example: Uint8Array.from({ length: 5 }, (v, k) => k); // Uint8Array [ 0, 1, 2, 3, 4 ]
[ -0.08234377205371857, -0.08871851861476898, -0.8886346817016602, 0.015890294685959816, -0.20902608335018158, -0.4893423020839691, -0.43000054359436035, 0.3962802588939667, -0.9384073615074158, 0.1569206863641739, -0.5211513638496399, 0.14010848104953766, -0.43195077776908875, -0.0569838285...
javascript/reference/global_objects/typedarray/from/index.md
JavaScript - Global Objects - TypedArray - from - Examples - Calling from() on non-TypedArray constructors: The `this` value of `from()` must be a constructor that returns a `TypedArray` instance. Example: function NotArray(len) { console.log("NotArray called with length", len); } Int8Array.from.call({}, []); // ...
[ 0.10232198983430862, 0.12396835535764694, -0.7055519819259644, 0.06292971223592758, 0.12344557791948318, -1.3266814947128296, -1.1306830644607544, 0.2803856134414673, -1.5649572610855103, 0.6014408469200134, 0.27574872970581055, 0.23166882991790771, -0.43221354484558105, -0.637394666671752...
javascript/reference/global_objects/typedarray/byteoffset/index.md
JavaScript - Global Objects - TypedArray - byteOffset: The `byteOffset` accessor property of `TypedArray` instances returns the offset (in bytes) of this typed array from the start of its `ArrayBuffer` or `SharedArrayBuffer`.
[ 0.2344457358121872, -0.543202817440033, -1.3490873575210571, 0.4812575578689575, 0.1873510479927063, -0.4274645745754242, 0.26411381363868713, 1.0881584882736206, -0.033696651458740234, -0.3269587755203247, -0.6120569705963135, 0.30316612124443054, -0.536046028137207, 0.3023289442062378, ...
javascript/reference/global_objects/typedarray/byteoffset/index.md
JavaScript - Global Objects - TypedArray - byteOffset - Description: The `byteOffset` property is an accessor property whose set accessor function is `undefined`, meaning that you can only read this property. The value is established when the typed array is constructed and cannot be changed. However, the `byteOffset` ...
[ -0.40912213921546936, -0.10466385632753372, -1.0884816646575928, 0.5128160715103149, 0.5526731014251709, -1.4663739204406738, 0.363434374332428, 1.6219220161437988, 0.6443784236907959, -0.21218560636043549, -0.5367767214775085, -0.008831540122628212, -0.6321900486946106, -0.051589895039796...
javascript/reference/global_objects/typedarray/byteoffset/index.md
JavaScript - Global Objects - TypedArray - byteOffset - Examples - Using the byteOffset property: Example: const buffer = new ArrayBuffer(8); const uint8array1 = new Uint8Array(buffer); uint8array1.byteOffset; // 0 (no offset specified) const uint8array2 = new Uint8Array(buffer, 3); uint8array2.byteOffset; // 3 (as...
[ -0.11714544147253036, -0.45061782002449036, -1.3006106615066528, 0.5887560844421387, 0.0992678552865982, -1.1658902168273926, -0.3287701904773712, 1.0180020332336426, -0.07173112034797668, 0.039867840707302094, -0.770324170589447, 0.5808202028274536, 0.2685140371322632, -0.2802282869815826...
javascript/reference/global_objects/typedarray/findlastindex/index.md
JavaScript - Global Objects - TypedArray - findLastIndex: The `findLastIndex()` method of `TypedArray` instances iterates the typed array in reverse order and returns the index of the first element that satisfies the provided testing function. If no elements satisfy the testing function, -1 is returned. This method ha...
[ -0.7906901240348816, -0.9553094506263733, -0.5763669013977051, 0.31156840920448303, 0.14930419623851776, -0.24138182401657104, 0.5859986543655396, 0.6636658906936646, -0.8710125088691711, 0.8554960489273071, -0.3184179365634918, -0.0121078472584486, -0.34248846769332886, 0.6201241612434387...
javascript/reference/global_objects/typedarray/findlastindex/index.md
JavaScript - Global Objects - TypedArray - findLastIndex - Syntax: Example: findLastIndex(callbackFn) findLastIndex(callbackFn, thisArg)
[ -0.7186880707740784, 0.11541920900344849, -0.49918586015701294, 0.12478874623775482, -0.9461467266082764, -0.7932222485542297, 0.5100626945495605, 0.6894656419754028, -0.6540295481681824, -0.13312101364135742, -0.6080083250999451, -0.04273741692304611, -0.4873054325580597, 0.98557889461517...
javascript/reference/global_objects/typedarray/findlastindex/index.md
JavaScript - Global Objects - TypedArray - findLastIndex - Syntax - Parameters: - `callbackFn`: A function to execute for each element in the typed array. It should return a truthy value to indicate a matching element has been found, and a falsy value otherwise. The function is called with the following arguments: -...
[ -0.6492310762405396, -0.33404025435447693, -1.0020405054092407, 0.09878276288509369, -0.3777894377708435, -0.9199714660644531, 1.086482286453247, 0.03536417335271835, -0.6672111749649048, 0.4055006802082062, -0.6953132152557373, 0.1549694836139679, -0.7497292757034302, 1.5937196016311646, ...
javascript/reference/global_objects/typedarray/findlastindex/index.md
JavaScript - Global Objects - TypedArray - findLastIndex - Syntax - Return value: The index of the last (highest-index) element in the typed array that passes the test. Otherwise `-1` if no matching element is found.
[ -0.18664444983005524, -0.5796998739242554, -0.5264350175857544, 0.31617528200149536, -0.23756608366966248, -0.29611915349960327, 1.0367188453674316, 0.931553840637207, -0.49448299407958984, 0.014171857386827469, -0.5855569243431091, 0.29170703887939453, -0.44274279475212097, 1.077098846435...
javascript/reference/global_objects/typedarray/findlastindex/index.md
JavaScript - Global Objects - TypedArray - findLastIndex - Description: See `Array.prototype.findLastIndex()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.5985496640205383, -0.10331127792596817, -0.5213780999183655, 0.3115054666996002, -0.5559113621711731, -0.3528115153312683, 0.12628906965255737, 0.6236281394958496, -0.11239877343177795, -0.0008191347005777061, -0.5901917219161987, -0.1633319854736328, 0.4596102833747864, 0.4876778423786...
javascript/reference/global_objects/typedarray/findlastindex/index.md
JavaScript - Global Objects - TypedArray - findLastIndex - Examples - Find the index of the last prime number in a typed array: The following example returns the index of the last element in the typed array that is a prime number, or `-1` if there is no prime number. Example: function isPrime(n) { if (n < 2) { ...
[ -0.5300519466400146, -0.7654320001602173, -0.5486562252044678, -0.00976969301700592, -0.4035816788673401, -0.549652099609375, 1.4413732290267944, 1.0805834531784058, -0.7007631659507751, 0.348038911819458, -0.7019525766372681, -0.2724735140800476, -0.5757699608802795, -0.10974974185228348,...
javascript/reference/global_objects/typedarray/slice/index.md
JavaScript - Global Objects - TypedArray - slice: The `slice()` method of `TypedArray` instances returns a copy of a portion of a typed array into a new typed array object selected from `start` to `end` (`end` not included) where `start` and `end` represent the index of items in that typed array. The original typed ar...
[ -0.6868076324462891, -0.7057335376739502, -1.278010368347168, 0.8044859170913696, 0.5396256446838379, 0.07502281665802002, -0.4369395971298218, 0.5846204161643982, -0.3939860761165619, 0.7977107763290405, 0.3893521726131439, 1.02681565284729, 0.1577998548746109, 0.03813060373067856, 0.34...
javascript/reference/global_objects/typedarray/slice/index.md
JavaScript - Global Objects - TypedArray - slice - Syntax: Example: slice() slice(start) slice(start, end)
[ 0.06267347931861877, 0.48384717106819153, -0.5847648978233337, -0.2827055752277374, -0.5884478688240051, -0.08658569306135178, -0.07040081173181534, 0.874967634677887, -0.33214569091796875, 0.0504123829305172, 0.521694004535675, 0.1027064099907875, -0.3890898823738098, 0.19975833594799042,...
javascript/reference/global_objects/typedarray/slice/index.md
JavaScript - Global Objects - TypedArray - slice - Syntax - Parameters: - `start` (optional): Zero-based index at which to start extraction, converted to an integer. - `end` (optional): Zero-based index at which to end extraction, converted to an integer. `slice()` extracts up to but not including `end`.
[ -0.4598025977611542, 0.31044960021972656, -0.8575228452682495, 0.7831122279167175, 0.0669693797826767, -0.6176746487617493, 0.10001007467508316, 0.20118288695812225, 0.08714570105075836, 0.31470492482185364, -0.4345763027667999, 0.09744814038276672, -0.003629675367847085, 0.058931130915880...
javascript/reference/global_objects/typedarray/slice/index.md
JavaScript - Global Objects - TypedArray - slice - Syntax - Return value: A new typed array containing the extracted elements.
[ -0.1677038073539734, -0.44970735907554626, -1.2000395059585571, 0.28084099292755127, -0.19050003588199615, -0.5240138173103333, 0.26961854100227356, 1.070802092552185, -0.17166294157505035, 0.48310258984565735, -0.21887552738189697, 0.5724205374717712, -0.6962197422981262, 0.89335715770721...
javascript/reference/global_objects/typedarray/slice/index.md
JavaScript - Global Objects - TypedArray - slice - Description: See `Array.prototype.slice()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.43394482135772705, 0.1672286093235016, -0.5061982274055481, 0.4007638990879059, -0.024171268567442894, -0.03163940832018852, -0.008157490752637386, 0.4240640103816986, -0.4386052191257477, 0.4144381284713745, -0.13142235577106476, 0.2563088834285736, 0.11108708381652832, 0.0691906884312...
javascript/reference/global_objects/typedarray/slice/index.md
JavaScript - Global Objects - TypedArray - slice - Examples - Return a portion of an existing typed array: Example: const bytes = new Uint8Array([1, 2, 3]); bytes.slice(1); // Uint8Array [ 2, 3 ] bytes.slice(2); // Uint8Array [ 3 ] bytes.slice(-2); // Uint8Array [ 2, 3 ] bytes.slice(0, 1); // Uint8Array [ 1 ]
[ -0.4258967936038971, 0.04665141552686691, -1.0224820375442505, 0.8508252501487732, 0.3412928283214569, -0.5121369957923889, -0.33079954981803894, 0.5778207778930664, -0.6982021927833557, 0.5053539276123047, -0.1511676013469696, 0.8274424076080322, -0.09348943829536438, 0.06781475991010666,...
javascript/reference/global_objects/typedarray/reduce/index.md
JavaScript - Global Objects - TypedArray - reduce: The `reduce()` method of `TypedArray` instances executes a user-supplied "reducer" callback function on each element of the typed array, in order, passing in the return value from the calculation on the preceding element. The final result of running the reducer across...
[ -0.6106601357460022, -0.8121148347854614, -1.7834103107452393, 0.5152709484100342, -0.08977614343166351, -0.5131164193153381, 0.1202075332403183, 0.5985819101333618, -0.6126744151115417, 0.976144015789032, -0.6116244792938232, 0.38818690180778503, 0.16536492109298706, 0.5493261814117432, ...
javascript/reference/global_objects/typedarray/reduce/index.md
JavaScript - Global Objects - TypedArray - reduce - Syntax: Example: reduce(callbackFn) reduce(callbackFn, initialValue)
[ -0.079591304063797, 0.5739845037460327, -0.32763150334358215, -0.04877110943198204, -1.0731383562088013, -1.4631080627441406, 1.251399040222168, 0.7394130825996399, -0.49494072794914246, 0.614716112613678, -0.9067725539207458, -0.6613078713417053, -1.1468271017074585, 0.9603937268257141, ...
javascript/reference/global_objects/typedarray/reduce/index.md
JavaScript - Global Objects - TypedArray - reduce - Syntax - Parameters: - `callbackFn`: A function to execute for each element in the typed array. Its return value becomes the value of the `accumulator` parameter on the next invocation of `callbackFn`. For the last invocation, the return value becomes the return valu...
[ -0.31647878885269165, -0.09607219696044922, -1.3451611995697021, -0.1357286274433136, 0.018200580030679703, -1.0340497493743896, 0.9871900081634521, 0.5397205352783203, -0.4205944240093231, 0.842727780342102, -0.7973715662956238, 0.12154940515756607, -1.1457175016403198, 1.5475207567214966...
javascript/reference/global_objects/typedarray/reduce/index.md
JavaScript - Global Objects - TypedArray - reduce - Syntax - Return value: The value that results from running the "reducer" callback function to completion over the entire typed array.
[ -0.49274975061416626, 0.040984902530908585, -1.2539595365524292, 0.456420361995697, -0.4475792348384857, -0.8672620058059692, 0.5328741073608398, 1.1144028902053833, -0.15471449494361877, 0.35447534918785095, -0.925597071647644, 0.2886602282524109, -0.4509274363517761, 1.3925575017929077, ...
javascript/reference/global_objects/typedarray/reduce/index.md
JavaScript - Global Objects - TypedArray - reduce - Syntax - Exceptions: - `TypeError`: Thrown if the typed array contains no elements and `initialValue` is not provided.
[ -0.4003031849861145, 0.06880559772253036, -0.5021666884422302, 0.4147917330265045, -0.3104429244995117, -0.8159909248352051, 0.9451497197151184, 1.2863401174545288, -0.768930196762085, 0.003576600691303611, -0.3224790394306183, -0.9310957193374634, -0.9291403293609619, -0.3096447288990021,...
javascript/reference/global_objects/typedarray/reduce/index.md
JavaScript - Global Objects - TypedArray - reduce - Description: See `Array.prototype.reduce()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.5048944354057312, 0.1565743237733841, -0.34259048104286194, 0.23348937928676605, -0.32657390832901, -1.139630675315857, 0.3541593551635742, 1.0197042226791382, -0.06116925925016403, 0.39111799001693726, -1.0372246503829956, -0.12294425070285797, -0.019657593220472336, 0.1341813057661056...
javascript/reference/global_objects/typedarray/reduce/index.md
JavaScript - Global Objects - TypedArray - reduce - Examples - Sum up all values within an array: Example: const total = new Uint8Array([0, 1, 2, 3]).reduce((a, b) => a + b); // total === 6
[ 0.057510413229465485, -0.02198833040893078, -1.0254154205322266, 0.19925659894943237, -0.5296482443809509, -1.2130043506622314, -0.35558077692985535, 0.834732711315155, -0.10763977468013763, 0.10495992004871368, -0.7244894504547119, 0.43901604413986206, -0.1289374828338623, -0.111822560429...
javascript/reference/global_objects/typedarray/fill/index.md
JavaScript - Global Objects - TypedArray - fill: The `fill()` method of `TypedArray` instances changes all elements within a range of indices in a typed array to a static value. It returns the modified typed array. This method has the same algorithm as `Array.prototype.fill()`. Example: const uint8 = new Uint8Array(...
[ -0.32416877150535583, -0.7982619404792786, -0.8795285224914551, 0.5034507513046265, 0.2077726274728775, -1.4595028162002563, 0.010071956552565098, 0.9690473079681396, -0.28655484318733215, 0.4743160903453827, 0.14304761588573456, 0.3905244767665863, 0.2298588901758194, -0.19204622507095337...
javascript/reference/global_objects/typedarray/fill/index.md
JavaScript - Global Objects - TypedArray - fill - Syntax: Example: fill(value) fill(value, start) fill(value, start, end)
[ 0.3261433243751526, 0.21598945558071136, -0.40521934628486633, -0.1923544704914093, -0.7520986795425415, -1.685096025466919, 0.6917343735694885, 1.2179769277572632, -0.4079068899154663, -0.7832163572311401, 0.42630836367607117, 0.3813832104206085, -0.21846523880958557, -0.02007304131984710...
javascript/reference/global_objects/typedarray/fill/index.md
JavaScript - Global Objects - TypedArray - fill - Syntax - Parameters: - `value`: Value to fill the typed array with. - `start` (optional): Zero-based index at which to start filling, converted to an integer. - `end` (optional): Zero-based index at which to end filling, converted to an integer. `fill()` fills up to bu...
[ -0.05103450268507004, 0.07910097390413284, -0.41426169872283936, 0.5514941811561584, -0.03241781145334244, -1.3551579713821411, 0.9211148619651794, 0.8693693280220032, -0.15369923412799835, -0.34098947048187256, -0.04662735387682915, 0.5314955711364746, -0.0013376610586419702, -0.058068152...
javascript/reference/global_objects/typedarray/fill/index.md
JavaScript - Global Objects - TypedArray - fill - Syntax - Return value: The modified typed array, filled with `value`.
[ 0.22559711337089539, -0.2622801959514618, -0.38190898299217224, 0.17489199340343475, -0.44894930720329285, -1.6269173622131348, 0.7320658564567566, 1.476405382156372, -0.3305436372756958, -0.1637490689754486, -0.15099196135997772, 0.8866244554519653, -0.6296173334121704, 0.6725313067436218...
javascript/reference/global_objects/typedarray/fill/index.md
JavaScript - Global Objects - TypedArray - fill - Description: See `Array.prototype.fill()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.4685375690460205, 0.050598252564668655, -0.30789315700531006, 0.09737063944339752, -0.20938046276569366, -1.3759872913360596, 0.5665845274925232, 0.8899825811386108, -0.5173229575157166, -0.21684256196022034, -0.13502788543701172, 0.34409642219543457, 0.2894596457481384, -0.118296146392...
javascript/reference/global_objects/typedarray/fill/index.md
JavaScript - Global Objects - TypedArray - fill - Examples - Using fill(): Example: new Uint8Array([1, 2, 3]).fill(4); // Uint8Array [4, 4, 4] new Uint8Array([1, 2, 3]).fill(4, 1); // Uint8Array [1, 4, 4] new Uint8Array([1, 2, 3]).fill(4, 1, 2); // Uint8Array [1, 4, 3] new Uint8Array([1, 2, 3]).fill(4, 1, 1); // Uint...
[ -0.6283016204833984, 0.3369365334510803, -0.8312077522277832, 0.5311960577964783, 0.0793849527835846, -1.4950681924819946, 0.05025064945220947, 0.6189998984336853, -0.7269801497459412, 0.16943934559822083, -0.014054661616683006, 0.5379627346992493, 0.5244991183280945, -0.3299008309841156, ...
javascript/reference/global_objects/typedarray/bytes_per_element/index.md
JavaScript - Global Objects - TypedArray - BYTES_PER_ELEMENT: The `TypedArray.BYTES_PER_ELEMENT` static data property represents the size in bytes of each element in a typed array. Example: console.log(Float64Array.BYTES_PER_ELEMENT); // Expected output: 8 console.log(Int8Array.BYTES_PER_ELEMENT); // Expected outpu...
[ -0.4013613760471344, -0.6093196272850037, -1.5252048969268799, 0.3092299699783325, 0.1511431634426117, -1.2118339538574219, -0.22169461846351624, 0.5716103315353394, -0.021383414044976234, 0.08061826229095459, 0.38623949885368347, 0.7363064885139465, -0.1769835650920868, -0.737135231494903...
javascript/reference/global_objects/typedarray/bytes_per_element/index.md
JavaScript - Global Objects - TypedArray - BYTES_PER_ELEMENT - Value: A number whose value depends on the type of `TypedArray`.
[ 0.17893493175506592, -0.7353726625442505, -0.9982198476791382, 0.05075358971953392, -0.07655009627342224, -0.843750536441803, 0.6316829323768616, 0.9866543412208557, -0.05808728188276291, -0.14185060560703278, -0.45455554127693176, 0.09557987749576569, -0.2824873924255371, 0.05749366432428...
javascript/reference/global_objects/typedarray/bytes_per_element/index.md
JavaScript - Global Objects - TypedArray - BYTES_PER_ELEMENT - Description: `TypedArray` objects differ from each other in the number of bytes per element and in the way the bytes are interpreted. The `BYTES_PER_ELEMENT` constant contains the number of bytes each element in the given `TypedArray` has. The `BYTES_PER_...
[ 0.4093559980392456, -0.9079003930091858, -0.9602900743484497, 0.523267924785614, 0.5972144603729248, -1.4304875135421753, -0.09965259581804276, 0.1653844714164734, 0.2228873074054718, 0.28784579038619995, -0.14648987352848053, 0.08314328640699387, -0.6520376205444336, -0.5405052304267883, ...
javascript/reference/global_objects/typedarray/bytes_per_element/index.md
JavaScript - Global Objects - TypedArray - BYTES_PER_ELEMENT - Examples - Using BYTES_PER_ELEMENT: As a static property: Example: Int8Array.BYTES_PER_ELEMENT; // 1 Uint8Array.BYTES_PER_ELEMENT; // 1 Uint8ClampedArray.BYTES_PER_ELEMENT; // 1 Int16Array.BYTES_PER_ELEMENT; // 2 Uint16Array.BYTES_PER_ELEMENT; // 2 Float...
[ -0.5489323139190674, 0.0955294817686081, -0.5945232510566711, 0.5862506031990051, 0.4293784499168396, -0.456324964761734, 0.45369961857795715, 1.0071998834609985, -0.28393709659576416, 0.4438590109348297, -0.25354188680648804, 0.12532640993595123, -0.5683711767196655, 0.01615118607878685, ...
javascript/reference/global_objects/typedarray/sort/index.md
JavaScript - Global Objects - TypedArray - sort: The `sort()` method of `TypedArray` instances sorts the elements of a typed array in place and returns the reference to the same typed array, now sorted. This method has the same algorithm as `Array.prototype.sort()`, except that it sorts the values numerically instead ...
[ -0.10382845997810364, -0.9619782567024231, -1.1219245195388794, 0.4978712499141693, 0.10280227661132812, -0.2167113870382309, -0.45193248987197876, 1.0142115354537964, -0.39689844846725464, 0.6088705658912659, 0.05789165943861008, 0.4177025258541107, -0.2392982393503189, 0.0977280661463737...
javascript/reference/global_objects/typedarray/sort/index.md
JavaScript - Global Objects - TypedArray - sort - Syntax: Example: sort() sort(compareFn)
[ 0.3663891851902008, -0.27785930037498474, -0.6271482706069946, -0.3668586313724518, -0.5022221207618713, -0.44904378056526184, -0.23445484042167664, 0.7782807946205139, -0.6851049065589905, 0.36194178462028503, -0.19529342651367188, 0.07743910700082779, -1.0884995460510254, 0.3233977258205...
javascript/reference/global_objects/typedarray/sort/index.md
JavaScript - Global Objects - TypedArray - sort - Syntax - Parameters: - `compareFn` (optional): A function that determines the order of the elements. The function is called with the following arguments: - `a`: The first element for comparison. - `b`: The second element for comparison. It should return a number whe...
[ -0.13197682797908783, -0.47138386964797974, -0.9370277523994446, -0.6209501624107361, 0.17860721051692963, -0.40544599294662476, 0.47847846150398254, 0.4464299976825714, -0.0731184333562851, 0.7586604356765747, -0.8235787749290466, -0.03936830908060074, -1.0896577835083008, 0.8204053044319...
javascript/reference/global_objects/typedarray/sort/index.md
JavaScript - Global Objects - TypedArray - sort - Syntax - Return value: The reference to the original typed array, now sorted. Note that the typed array is sorted in place, and no copy is made.
[ 0.15382662415504456, 0.054887961596250534, -1.0663496255874634, 0.2557154595851898, -0.3038561940193176, -0.608496904373169, 0.45457929372787476, 1.4790120124816895, -0.053302258253097534, 0.12368441373109818, -0.3530551493167877, 0.5453492999076843, -0.524799644947052, 0.6694923043251038,...
javascript/reference/global_objects/typedarray/sort/index.md
JavaScript - Global Objects - TypedArray - sort - Description: See `Array.prototype.sort()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.06741482019424438, -0.15345267951488495, -0.39737677574157715, 0.22024992108345032, -0.2878801226615906, -0.21946874260902405, -0.19192026555538177, 0.9432415962219238, -0.2186821848154068, 0.03501088544726372, -0.49406182765960693, -0.049948759377002716, 0.05676871910691261, -0.0155579...
javascript/reference/global_objects/typedarray/sort/index.md
JavaScript - Global Objects - TypedArray - sort - Examples - Using sort(): For more examples, see also the `Array.prototype.sort()` method. Example: let numbers = new Uint8Array([40, 1, 5, 200]); numbers.sort(); // Uint8Array [ 1, 5, 40, 200 ] // Unlike plain Arrays, a compare function is not required // to sort the...
[ -0.42764732241630554, -0.7097293138504028, -1.4655487537384033, 0.24060840904712677, -0.061953168362379074, -0.2483186274766922, -0.7308644652366638, 0.6778466105461121, -0.620886504650116, 0.23670852184295654, -0.39070215821266174, 0.24787265062332153, -0.18965300917625427, 0.211925998330...
javascript/reference/global_objects/typedarray/findindex/index.md
JavaScript - Global Objects - TypedArray - findIndex: The `findIndex()` method of `TypedArray` instances returns the index of the first element in a typed array that satisfies the provided testing function. If no elements satisfy the testing function, -1 is returned. This method has the same algorithm as `Array.protot...
[ -0.39566460251808167, -1.314338207244873, -0.7559115886688232, 0.42935237288475037, 0.4643019437789917, -0.6219231486320496, 0.4308924973011017, 0.669253945350647, -0.7188395261764526, 0.6053568124771118, -0.08200182020664215, -0.2975085973739624, -0.29507339000701904, 0.3166835308074951, ...
javascript/reference/global_objects/typedarray/findindex/index.md
JavaScript - Global Objects - TypedArray - findIndex - Syntax: Example: findIndex(callbackFn) findIndex(callbackFn, thisArg)
[ -0.5967313647270203, 0.006194371730089188, -0.5988511443138123, 0.06338384747505188, -0.698125422000885, -1.088324785232544, 0.32278764247894287, 0.8662461042404175, -0.4220685362815857, -0.3218352198600769, -0.6959507465362549, 0.03049182891845703, -0.6377732753753662, 0.7922961711883545,...
javascript/reference/global_objects/typedarray/findindex/index.md
JavaScript - Global Objects - TypedArray - findIndex - Syntax - Parameters: - `callbackFn`: A function to execute for each element in the typed array. It should return a truthy value to indicate a matching element has been found, and a falsy value otherwise. The function is called with the following arguments: - `el...
[ -0.8130210041999817, -0.34431517124176025, -1.227354884147644, -0.031840644776821136, -0.03396207094192505, -1.01715087890625, 0.5795213580131531, 0.145482137799263, -0.48859846591949463, 0.480578750371933, -0.6398267149925232, 0.21786636114120483, -0.8568326830863953, 1.601439356803894, ...
javascript/reference/global_objects/typedarray/findindex/index.md
JavaScript - Global Objects - TypedArray - findIndex - Syntax - Return value: The index of the first element in the typed array that passes the test. Otherwise, `-1`.
[ 0.10391630232334137, -0.29858875274658203, -0.7638335824012756, 0.44465914368629456, 0.014222763478755951, -0.34554728865623474, 0.7763867974281311, 1.1725611686706543, -0.3849809169769287, -0.16161900758743286, -0.68801349401474, 0.037041448056697845, -0.6124975681304932, 0.64916169643402...
javascript/reference/global_objects/typedarray/findindex/index.md
JavaScript - Global Objects - TypedArray - findIndex - Description: See `Array.prototype.findIndex()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.4829612672328949, -0.3387008309364319, -0.589724600315094, 0.45179083943367004, -0.17987146973609924, -0.40684518218040466, -0.26893720030784607, 0.772458016872406, 0.07742860913276672, -0.2521665096282959, -0.6798345446586609, -0.3171685039997101, 0.18317334353923798, 0.203286871314048...
javascript/reference/global_objects/typedarray/findindex/index.md
JavaScript - Global Objects - TypedArray - findIndex - Examples - Find the index of the first prime number in a typed array: The following example returns the index of the first element in the typed array that is a prime number, or `-1` if there is no prime number. Example: function isPrime(n) { if (n < 2) { r...
[ -0.609674334526062, -0.5796032547950745, -0.7395175695419312, 0.24075505137443542, -0.32112744450569153, -0.43798401951789856, 1.5946710109710693, 1.1813874244689941, -0.5136496424674988, 0.39407938718795776, -0.5392183065414429, -0.6837641596794128, -0.8371530771255493, -0.380371421575546...
javascript/reference/global_objects/typedarray/with/index.md
JavaScript - Global Objects - TypedArray - with: The `with()` method of `TypedArray` instances is the copying version of using the bracket notation to change the value of a given index. It returns a new typed array with the element at the given index replaced with the given value. This method has the same algorithm as...
[ -0.7405721545219421, -1.0371633768081665, -0.12380161136388779, 0.8819796442985535, 0.029189590364694595, -0.9779331088066101, 0.3224121034145355, 1.0150175094604492, 0.05364999175071716, 0.07829363644123077, -0.32235705852508545, 0.09084714204072952, 0.1296156346797943, -0.001163378241471...
javascript/reference/global_objects/typedarray/with/index.md
JavaScript - Global Objects - TypedArray - with - Syntax: Example: arrayInstance.with(index, value)
[ 0.026204628869891167, -0.21805348992347717, -0.07443667203187943, 0.5445822477340698, -0.6346059441566467, -0.8197869062423706, -0.21390943229198456, 0.8621363639831543, -0.03757525607943535, -0.4697554409503937, 0.13140715658664703, 0.46174243092536926, 0.24780289828777313, 0.023406630381...
javascript/reference/global_objects/typedarray/with/index.md
JavaScript - Global Objects - TypedArray - with - Syntax - Parameters: - `index`: Zero-based index at which to change the typed array, converted to an integer. - `value`: Any value to be assigned to the given index.
[ 0.3546101152896881, -0.29853367805480957, -0.7726384997367859, 0.6152528524398804, -0.14780226349830627, -1.0196465253829956, 0.4096146523952484, 0.7559600472450256, 0.26945456862449646, -0.35054466128349304, -0.6181166768074036, 0.17686626315116882, -0.20364423096179962, -0.00481533259153...
javascript/reference/global_objects/typedarray/with/index.md
JavaScript - Global Objects - TypedArray - with - Syntax - Return value: A new typed array with the element at `index` replaced with `value`.
[ 0.3177967667579651, -0.5306890606880188, -0.6167866587638855, 0.030593549832701683, -0.45604828000068665, -0.9565694332122803, -0.022436993196606636, 1.3000526428222656, -0.09804317355155945, -0.2487819492816925, -0.122148297727108, 0.4855634272098541, -0.4055269956588745, 0.63072991371154...
javascript/reference/global_objects/typedarray/with/index.md
JavaScript - Global Objects - TypedArray - with - Syntax - Exceptions: - `RangeError`: Thrown if `index >= array.length` or `index < -array.length`.
[ -0.6379328370094299, -0.3698042035102844, -0.7032309174537659, 0.5434684157371521, -0.44090837240219116, -1.4744861125946045, -0.3804987668991089, 0.8611049056053162, -0.6589103937149048, -0.25419166684150696, -0.5575968027114868, -0.051658883690834045, -0.7858963012695312, -0.146951079368...
javascript/reference/global_objects/typedarray/with/index.md
JavaScript - Global Objects - TypedArray - with - Description: See `Array.prototype.with()` for more details. This method is not generic and can only be called on typed array instances.
[ -0.24534718692302704, -0.03252796828746796, -0.027944963425397873, 0.33074313402175903, -0.3771683871746063, -0.8537269830703735, -0.09560809284448624, 0.7188858985900879, -0.38757434487342834, 0.06539412587881088, -0.3336679935455322, 0.28153491020202637, 0.3867591917514801, -0.3327504694...
javascript/reference/global_objects/typedarray/with/index.md
JavaScript - Global Objects - TypedArray - with - Examples - Using with(): Example: const arr = new Uint8Array([1, 2, 3, 4, 5]); console.log(arr.with(2, 6)); // Uint8Array [1, 2, 6, 4, 5] console.log(arr); // Uint8Array [1, 2, 3, 4, 5]
[ -0.10819688439369202, -0.37706950306892395, -0.5606052279472351, 0.732978880405426, -0.5283265709877014, -1.0131099224090576, -0.9387558698654175, 0.3647984266281128, -0.3217122256755829, 0.1253506988286972, 0.03516007959842682, 0.2686704397201538, -0.0062398347072303295, 0.023084511980414...
javascript/reference/global_objects/typedarray/every/index.md
JavaScript - Global Objects - TypedArray - every: The `every()` method of `TypedArray` instances returns `false` if it finds an element in the array that does not satisfy the provided testing function. Otherwise, it returns `true`. This method has the same algorithm as `Array.prototype.every()`. Example: function is...
[ -0.641505777835846, -1.517907738685608, -0.1027199849486351, 0.3602590560913086, 0.04770822823047638, -1.4253901243209839, 0.2320750504732132, 0.6830872893333435, -0.9681522250175476, 0.934555172920227, 0.0516623891890049, -0.12496814131736755, 0.03971071541309357, -0.3310054540634155, -...
javascript/reference/global_objects/typedarray/every/index.md
JavaScript - Global Objects - TypedArray - every - Syntax: Example: every(callbackFn) every(callbackFn, thisArg)
[ 0.23435713350772858, 0.05865984410047531, -0.23892168700695038, -0.1413646638393402, -1.2199701070785522, -1.7966068983078003, 1.1812939643859863, 0.5724039673805237, -0.43255922198295593, -0.14963264763355255, -0.5222671627998352, 0.21235094964504242, -0.6876534223556519, 0.48046165704727...
javascript/reference/global_objects/typedarray/every/index.md
JavaScript - Global Objects - TypedArray - every - Syntax - Parameters: - `callbackFn`: A function to execute for each element in the typed array. It should return a truthy value to indicate the element passes the test, and a falsy value otherwise. The function is called with the following arguments: - `element`: Th...
[ -0.3837701678276062, -0.4384743571281433, -0.8516968488693237, -0.145578071475029, -0.430873304605484, -1.2398390769958496, 1.0899027585983276, -0.34264349937438965, -0.8288102149963379, 0.45012423396110535, -0.7252549529075623, 0.42354151606559753, -0.7776934504508972, 1.2932549715042114,...
javascript/reference/global_objects/typedarray/every/index.md
JavaScript - Global Objects - TypedArray - every - Syntax - Return value: `true` unless `callbackFn` returns a `falsy` value for a typed array element, in which case `false` is immediately returned.
[ -0.35229140520095825, 0.07481159269809723, -0.4483867287635803, -0.022408386692404747, -1.0972754955291748, -1.4799525737762451, 0.9568120837211609, 0.308605819940567, -0.9327069520950317, 0.4721246063709259, -0.29886478185653687, 0.3186589479446411, -0.1687118411064148, 0.7239963412284851...