file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
javascript/reference/global_objects/symbol/split/index.md
JavaScript - Global Objects - Symbol - split: The `Symbol.split` static data property represents the well-known symbol `Symbol.split`. The `String.prototype.split()` method looks up this symbol on its first argument for the method that splits a string at the indices that match the current object. For more information...
[ -0.20484092831611633, -0.08253256231546402, -0.5298287272453308, 0.5742519497871399, 0.5869399309158325, -0.5357512831687927, -0.04719844460487366, 0.4458144009113312, -0.24423810839653015, -0.28770336508750916, -0.5093921422958374, 0.43348172307014465, -0.09483827650547028, 0.154492005705...
javascript/reference/global_objects/symbol/split/index.md
JavaScript - Global Objects - Symbol - split - Value: The well-known symbol `Symbol.split`.
[ 0.0979282334446907, 0.5180718302726746, -0.7848488688468933, -0.0759488195180893, -0.6008049249649048, -2.2467188835144043, 0.6614354252815247, 0.6971649527549744, 0.03442505747079849, -0.2577061951160431, -0.6506121158599854, 0.5570277571678162, 0.07045581191778183, 0.6401744484901428, ...
javascript/reference/global_objects/symbol/split/index.md
JavaScript - Global Objects - Symbol - split - Examples - Custom reverse split: Example: class ReverseSplit { [Symbol.split](string) { const array = string.split(" "); return array.reverse(); } } console.log("Another one bites the dust".split(new ReverseSplit())); // [ "dust", "the", "bites", "one", "Ano...
[ -0.5111671090126038, 0.523503303527832, -0.6979641914367676, 0.023223286494612694, -0.26626357436180115, -2.202702760696411, 0.3409556746482849, 0.5696290731430054, -0.14686249196529388, 0.6916109919548035, -0.5505408048629761, 0.5952995419502258, 0.027383703738451004, -0.3666645586490631,...
javascript/reference/global_objects/float64array/index.md
JavaScript - Global Objects - Float64Array: The `Float64Array` typed array represents an array of 64-bit floating point numbers in the platform byte order. If control over byte order is needed, use `DataView` instead. The contents are initialized to `0` unless initialization data is explicitly provided. Once establish...
[ 0.1450512856245041, -0.6413826942443848, -1.0134971141815186, -0.037146370857954025, 0.6323530673980713, -0.4486897587776184, 0.4876767694950104, 1.4186205863952637, 0.6404350399971008, 0.27266180515289307, -0.4207259714603424, 0.2586110532283783, 0.14531807601451874, 0.04056796804070473, ...
javascript/reference/global_objects/float64array/index.md
JavaScript - Global Objects - Float64Array - Constructor: - `Float64Array()`: Creates a new `Float64Array` object.
[ -0.4776442348957062, -0.09653688222169876, -1.000539779663086, -0.14688505232334137, -0.11352553218603134, -0.581340491771698, -0.6518334746360779, 1.1632294654846191, 0.3409772515296936, -0.1429118812084198, -0.3584941327571869, -0.14723052084445953, -0.2556425929069519, -0.12874685227870...
javascript/reference/global_objects/float64array/index.md
JavaScript - Global Objects - Float64Array - Static properties: Also inherits static properties from its parent `TypedArray`. - `Float64Array.BYTES_PER_ELEMENT`: Returns a number value of the element size. `8` in the case of `Float64Array`.
[ -0.4683978259563446, 0.059661865234375, -0.9967431426048279, -0.385184109210968, -0.12621526420116425, -1.2607762813568115, 0.4338459074497223, 1.0303634405136108, -0.12308283150196075, -0.20318719744682312, -0.4948762059211731, 0.786099374294281, -0.7652412056922913, -0.11793021112680435,...
javascript/reference/global_objects/float64array/index.md
JavaScript - Global Objects - Float64Array - Static methods: Inherits static methods from its parent `TypedArray`.
[ 0.04540633037686348, 0.14890459179878235, -0.954756498336792, -0.30834800004959106, 0.01385305542498827, -0.9535883069038391, 0.5868578553199768, 1.8253626823425293, -0.1568353772163391, -0.076039619743824, -0.6855230927467346, -0.27109822630882263, -0.6438370943069458, -0.1476615816354751...
javascript/reference/global_objects/float64array/index.md
JavaScript - Global Objects - Float64Array - Instance properties: Also inherits instance properties from its parent `TypedArray`. These properties are defined on `Float64Array.prototype` and shared by all `Float64Array` instances. - `Float64Array.prototype.BYTES_PER_ELEMENT`: Returns a number value of the element si...
[ 0.5322968363761902, -0.39907336235046387, -0.5207672715187073, 0.3110883831977844, 0.6390388607978821, -0.32462435960769653, 0.28541290760040283, 0.8082212209701538, 0.32439547777175903, -0.22586940228939056, -0.6301211714744568, 0.4779609739780426, -0.011813702061772346, -0.18174663186073...
javascript/reference/global_objects/float64array/index.md
JavaScript - Global Objects - Float64Array - Instance methods: Inherits instance methods from its parent `TypedArray`.
[ 0.433179646730423, -0.04679988697171211, -0.6225235462188721, -0.061668023467063904, -0.1571298986673355, -0.6679108738899231, 0.6128930449485779, 1.2665492296218872, -0.19943948090076447, -0.4653242528438568, -0.43782058358192444, 0.10493601858615875, -0.527159571647644, 0.183402210474014...
javascript/reference/global_objects/float64array/index.md
JavaScript - Global Objects - Float64Array - Examples - Different ways to create a Float64Array: Example: // From a length const float64 = new Float64Array(2); float64[0] = 42; console.log(float64[0]); // 42 console.log(float64.length); // 2 console.log(float64.BYTES_PER_ELEMENT); // 8 // From an array const x = new...
[ 0.4529620409011841, -0.27671563625335693, -0.7152944803237915, -0.14047527313232422, 0.33754509687423706, -0.3523901700973511, -0.8987389206886292, 0.6055099964141846, 0.4302758574485779, -0.10914269089698792, 0.15146805346012115, 0.5243920087814331, -0.6629434823989868, -0.190089598298072...
javascript/reference/global_objects/float64array/float64array/index.md
JavaScript - Global Objects - Float64Array: The `Float64Array()` constructor creates `Float64Array` objects. The contents are initialized to `0` unless initialization data is explicitly provided.
[ 0.019682588055729866, -0.10214590281248093, -0.6833481192588806, 0.3489651679992676, -0.10658423602581024, -0.7381882071495056, -0.2131214588880539, 1.0332547426223755, 0.03483716771006584, 0.16129601001739502, -0.46897220611572266, -0.3791203796863556, -0.422812819480896, -0.4758692383766...
javascript/reference/global_objects/float64array/float64array/index.md
JavaScript - Global Objects - Float64Array - Syntax: Example: new Float64Array() new Float64Array(length) new Float64Array(typedArray) new Float64Array(object) new Float64Array(buffer) new Float64Array(buffer, byteOffset) new Float64Array(buffer, byteOffset, length) Note: `Float64Array()` can only be constructed wi...
[ 0.13274656236171722, 0.02359093725681305, -0.9107665419578552, -0.7284537553787231, -0.08693918585777283, -0.8835468292236328, -0.8590442538261414, 1.3032084703445435, 0.5650821924209595, -0.1831086426973343, -0.036679282784461975, 0.2784538269042969, -0.0029940251260995865, 0.008782761171...
javascript/reference/global_objects/float64array/float64array/index.md
JavaScript - Global Objects - Float64Array - Syntax - Parameters: See `TypedArray`.
[ 0.7967059016227722, 0.029023971408605576, -0.8368009924888611, -0.40312957763671875, -0.33605214953422546, -0.42338961362838745, 0.1314043551683426, 1.2991732358932495, 0.32977908849716187, 0.15274284780025482, -0.24054579436779022, 0.28583088517189026, 0.2842378616333008, 0.18181522190570...
javascript/reference/global_objects/float64array/float64array/index.md
JavaScript - Global Objects - Float64Array - Syntax - Exceptions: See `TypedArray`.
[ 0.4374486804008484, -0.272428959608078, -0.5592332482337952, -0.10263940691947937, -0.4392393231391907, -0.800693154335022, -0.19763700664043427, 1.421399474143982, 0.1524500995874405, -0.05385967344045639, 0.029799088835716248, -0.037732865661382675, -0.054215673357248306, 0.1376560926437...
javascript/reference/global_objects/float64array/float64array/index.md
JavaScript - Global Objects - Float64Array - Examples - Different ways to create a Float64Array: Example: // From a length const float64 = new Float64Array(2); float64[0] = 42; console.log(float64[0]); // 42 console.log(float64.length); // 2 console.log(float64.BYTES_PER_ELEMENT); // 8 // From an array const x = new...
[ 0.4529620409011841, -0.27671563625335693, -0.7152944803237915, -0.14047527313232422, 0.33754509687423706, -0.3523901700973511, -0.8987389206886292, 0.6055099964141846, 0.4302758574485779, -0.10914269089698792, 0.15146805346012115, 0.5243920087814331, -0.6629434823989868, -0.190089598298072...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics: The `Atomics` namespace object contains static methods for carrying out atomic operations. They are used with `SharedArrayBuffer` and `ArrayBuffer` objects.
[ 0.2874061167240143, -0.09982895851135254, -1.2339727878570557, 0.22887754440307617, 0.15179187059402466, -2.0719754695892334, 1.0514334440231323, 0.7317856550216675, 0.7199854850769043, 0.6953486800193787, -0.949112057685852, -0.9303392767906189, 0.35006365180015564, 0.051614005118608475, ...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Description: Unlike most global objects, `Atomics` is not a constructor. You cannot use it with the `new` operator or invoke the `Atomics` object as a function. All properties and methods of `Atomics` are static (just like the `Math` object).
[ 0.13603685796260834, -0.010311155579984188, -0.7744972705841064, -0.14010021090507507, -0.441701740026474, -3.2398476600646973, -0.22708366811275482, 0.9696758389472961, 0.5632269382476807, -0.18685734272003174, -0.7315482497215271, -0.7879136204719543, 0.41272854804992676, -0.320985108613...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Description - Atomic operations: When memory is shared, multiple threads can read and write the same data in memory. Atomic operations make sure that predictable values are written and read, that operations are finished before the next operation starts and that operations are no...
[ 0.5114719271659851, 0.38195741176605225, -1.0829498767852783, -0.002272001700475812, -0.1951584368944168, -1.3027147054672241, 0.2372821867465973, 0.5925411581993103, 0.9614807963371277, -0.056333862245082855, -0.9077414274215698, -1.3549823760986328, 0.04417695850133896, 0.300449609756469...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Description - Wait and notify: The `wait()` and `notify()` methods are modeled on Linux futexes ("fast user-space mutex") and provide ways for waiting until a certain condition becomes true and are typically used as blocking constructs.
[ -0.432221919298172, 0.3811503052711487, -0.3387998044490814, 0.39320680499076843, -0.4628072679042816, -2.5026333332061768, 0.6411453485488892, 1.1782265901565552, 0.22019319236278534, 0.7413522005081177, -0.7586634755134583, -0.227677583694458, -0.06917890906333923, -0.031605616211891174,...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Static properties: - `Atomics[Symbol.toStringTag]`: The initial value of the `[Symbol.toStringTag]` property is the string `"Atomics"`. This property is used in `Object.prototype.toString()`.
[ -0.6057170629501343, 0.480058878660202, -0.02613021619617939, -0.45328447222709656, -0.2376435399055481, -3.303466320037842, 0.8328637480735779, 0.9192675948143005, 0.28338709473609924, -0.461638480424881, -0.9827946424484253, -0.7116917967796326, 0.046908289194107056, -0.5385170578956604,...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Static methods: - `Atomics.add()`: Adds the provided value to the existing value at the specified index of the array. Returns the old value at that index. - `Atomics.and()`: Computes a bitwise AND on the value at the specified index of the array with the provided value. Returns ...
[ 0.45505261421203613, -0.16579669713974, -0.8081080913543701, 0.43171218037605286, 0.19497600197792053, -0.5572903752326965, 0.8095833659172058, 0.6849934458732605, 0.5885017514228821, -0.028989996761083603, -1.3089417219161987, -0.35308679938316345, -0.413906455039978, 0.5263471603393555, ...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.7470375299453735, 0.692237138748169, -1.5648642778396606, -0.28888580203056335, -0.8828091025352478, -0.6043067574501038, 0.8044332265853882, 0.25380170345306396, 0.08313668519258499, -0.32444578409194946, 0.10329372435808182, -0.007187326904386282, -0.5328009128570557, -0.60853630304336...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Examples - Using Atomics: Example: const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); ta[0]; // 0 ta[0] = 5; // 5 Atomics.add(ta, 0, 12); // 5 Atomics.load(ta, 0); // 17 Atomics.and(ta, 0, 1); // 17 Atomics.load(ta, 0); // 1 Atomics.compareExchange(ta,...
[ 0.7310256361961365, 0.06934463977813721, -1.0082612037658691, 0.18597598373889923, -0.3906630277633667, -1.52768075466156, 0.7711007595062256, 0.20645563304424286, 0.4254406988620758, 0.5172985196113586, -0.642819344997406, -0.2936807870864868, -0.6128228306770325, -0.22846189141273499, ...
javascript/reference/global_objects/atomics/index.md
JavaScript - Global Objects - Atomics - Examples - Waiting and notifying: Given a shared `Int32Array`: Example: const sab = new SharedArrayBuffer(1024); const int32 = new Int32Array(sab); A reading thread is sleeping and waiting on location 0 because the provided value matches what is stored at the provided index. ...
[ 0.2125817984342575, -0.02773202769458294, -0.2832109034061432, 0.3086646497249603, -0.05891742184758186, -1.685498595237732, -0.7421867847442627, 0.6255238652229309, 0.07415545731782913, 0.02922241948544979, 0.35977616906166077, -0.6665465235710144, -0.5924209356307983, -0.078093022108078,...
javascript/reference/global_objects/atomics/store/index.md
JavaScript - Global Objects - Atomics - store: The `Atomics.store()` static method stores a given value at a given position in the array and returns that value. This atomic operation guarantees that the write is tear-free, and that all atomic writes are sequentially consistent. Note that unlike many other `Atomic` me...
[ 0.14179064333438873, -0.13134396076202393, -1.1026971340179443, 0.05968175455927849, 0.4940807819366455, -2.035219669342041, 0.16362498700618744, 1.208608627319336, 0.23968639969825745, 0.17984752357006073, -0.13150595128536224, -0.44964414834976196, 0.07646280527114868, -0.080528348684310...
javascript/reference/global_objects/atomics/store/index.md
JavaScript - Global Objects - Atomics - store - Syntax: Example: Atomics.store(typedArray, index, value)
[ 0.932471752166748, -0.15598370134830475, -0.5874087810516357, 0.18802136182785034, -0.6889359354972839, -1.6011548042297363, -0.3907889723777771, 0.8711321949958801, 0.36733120679855347, -0.6319448351860046, 0.23333609104156494, -0.41551393270492554, -0.34136679768562317, -0.20707094669342...
javascript/reference/global_objects/atomics/store/index.md
JavaScript - Global Objects - Atomics - store - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to store a `value` in. - `value`: Th...
[ 1.0773478746414185, -0.5870195031166077, -1.1221330165863037, 0.2905239462852478, 0.05984208360314369, -0.9610798358917236, -0.5645043849945068, 1.0368235111236572, 0.6334308385848999, -0.10382141172885895, -0.3355792164802551, 0.1585393249988556, -1.0926026105880737, 0.5532039403915405, ...
javascript/reference/global_objects/atomics/store/index.md
JavaScript - Global Objects - Atomics - store - Syntax - Return value: The value that has been stored.
[ 1.1448757648468018, 0.1563979685306549, -0.833332896232605, -0.21318665146827698, -0.6215810179710388, -1.9073383808135986, 0.2572743594646454, 1.1956504583358765, 0.004615774843841791, -0.24029532074928284, -0.5358120203018188, 0.43017858266830444, -0.8741872310638428, 1.207654356956482, ...
javascript/reference/global_objects/atomics/store/index.md
JavaScript - Global Objects - Atomics - store - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.2544223666191101, -0.32784977555274963, -0.36207717657089233, 0.56707763671875, -0.20883885025978088, -1.9287832975387573, -0.8242596983909607, 0.8499940037727356, -0.18435215950012207, -0.1775953322649002, -0.620586633682251, -0.195151224732399, -0.6811890006065369, -0.5204799771308899,...
javascript/reference/global_objects/atomics/store/index.md
JavaScript - Global Objects - Atomics - store - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.8914153575897217, 0.563412070274353, -1.712507963180542, -0.0012387856841087341, -0.7723527550697327, -0.33879730105400085, 0.5054535269737244, 0.2630048990249634, 0.23333241045475006, -0.2853251099586487, 0.15861622989177704, 0.08411937952041626, -0.7311592102050781, -0.4915611445903778...
javascript/reference/global_objects/atomics/store/index.md
JavaScript - Global Objects - Atomics - store - Examples - Using Atomics.store(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); console.log(Atomics.store(ta, 0, 12)); // 12, the new/current value console.log(Atomics.load(ta, 0)); ...
[ 0.6885578036308289, 0.015478871762752533, -1.0432648658752441, 0.7058456540107727, -0.1384391188621521, -1.048555850982666, -0.4265502691268921, -0.04550487548112869, 0.5716201663017273, 0.10939855128526688, 0.33829042315483093, 0.15050378441810608, -0.3488466143608093, -0.6257539391517639...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or: The `Atomics.or()` static method computes a bitwise OR with a given value at a given position in the array, and returns the old value at that position. This atomic operation guarantees that no other write happens until the modified value is written back.
[ 0.09710933268070221, 0.0628696009516716, -0.25213244557380676, -0.028797440230846405, 0.06578456610441208, -1.914725661277771, 0.8302624225616455, 0.8335555791854858, 0.5084432363510132, 0.32080498337745667, -0.5909079313278198, -0.7585012912750244, 0.4735885560512543, -0.300277978181839, ...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or - Syntax: Example: Atomics.or(typedArray, index, value)
[ 0.8335059881210327, -0.13082998991012573, -0.06819330900907516, -0.3175666928291321, -0.649079442024231, -2.2306535243988037, -0.2021624743938446, 0.7391895055770874, 0.41713497042655945, -0.3380875587463379, -0.38047367334365845, -0.7666167616844177, -0.28481781482696533, -0.4313843846321...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to compute the bitwise OR. - `value`: T...
[ 0.9736618995666504, -0.46014484763145447, -0.9233454465866089, -0.09133753180503845, 0.24232123792171478, -1.2389580011367798, -0.30111733078956604, 0.7678535580635071, 0.6849068403244019, 0.643390417098999, -0.4892578721046448, -0.12644241750240326, -0.5547407865524292, 0.3480901420116424...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or - Syntax - Return value: The old value at the given position (`typedArray[index]`).
[ 0.5131169557571411, -0.33456048369407654, -0.9380612373352051, -0.478303462266922, -0.6034210324287415, -2.188734292984009, 0.39049041271209717, 1.204302191734314, -0.09769367426633835, 0.18531042337417603, -0.6713351607322693, 0.32023873925209045, -0.44291621446609497, 0.880667507648468, ...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.07786126434803009, -0.4195653796195984, -0.13762247562408447, 0.36521926522254944, -0.22183141112327576, -2.2740795612335205, -0.6080067157745361, 0.7592004537582397, -0.10107806324958801, -0.1495179384946823, -0.6815014481544495, -0.21647074818611145, -0.5725754499435425, -0.56475806236...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or - Description: The bitwise OR operation yields 1, if either `a` or `b` are 1. The truth table for the OR operation is: - `a`: 0, `b`: 0, `a | b`: 0 - `a`: 0, `b`: 1, `a | b`: 1 - `a`: 1, `b`: 0, `a | b`: 1 - `a`: 1, `b`: 1, `a | b`: 1 For example, a bitwise OR of `5 | 1` re...
[ 0.33892473578453064, 0.4955046772956848, -1.3924192190170288, 0.10662072896957397, 0.08948370069265366, -1.5688632726669312, -0.12553267180919647, 1.3290410041809082, 0.49208155274391174, 0.3957013189792633, -1.2042711973190308, -0.9586398005485535, 0.30135664343833923, 0.14356495440006256...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.8386191725730896, 0.5346293449401855, -1.479010820388794, -0.275058388710022, -0.9001030325889587, -0.6274240016937256, 0.6393046379089355, 0.2490282952785492, 0.24166366457939148, -0.4322354197502136, 0.06765647977590561, 0.07008079439401627, -0.6282051801681519, -0.6589813232421875, ...
javascript/reference/global_objects/atomics/or/index.md
JavaScript - Global Objects - Atomics - or - Examples - Using Atomics.or(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); // Create a view and set the value of the 0 index const ta = new Uint8Array(sab); ta[0] = 7; // 7 (0111) OR 10 (1010) = 15 (1111) console.lo...
[ 0.44323617219924927, 0.2689630389213562, -0.9442764520645142, 0.4519790709018707, 0.0017904778942465782, -1.5880024433135986, 0.3579963743686676, 0.0955907553434372, 0.7583696246147156, 0.17047280073165894, -0.26862990856170654, -0.2587015926837921, -0.18411922454833984, -0.479070216417312...
javascript/reference/global_objects/atomics/waitasync/index.md
JavaScript - Global Objects - Atomics - waitAsync: The `Atomics.waitAsync()` static method verifies that a shared memory location contains a given value, immediately returning an object with the `value` property containing the string `"not-equal"` if the memory location does not match the given value, or `"timed-out"`...
[ 0.17043671011924744, 0.1404426544904709, -0.5763469338417053, -0.19304704666137695, -0.469283789396286, -1.6571463346481323, 0.5669385194778442, 0.5863264799118042, -0.2210913598537445, 0.44234326481819153, -0.17634402215480804, -0.30294668674468994, 0.4768713116645813, 1.0404644012451172,...
javascript/reference/global_objects/atomics/waitasync/index.md
JavaScript - Global Objects - Atomics - waitAsync - Syntax: Example: Atomics.waitAsync(typedArray, index, value) Atomics.waitAsync(typedArray, index, value, timeout)
[ 0.5054616332054138, 0.32681187987327576, -0.43453747034072876, -0.05954090133309364, -0.8829954862594604, -1.3210117816925049, -0.3954954445362091, 1.1841634511947632, 0.04236866161227226, -0.05508216470479965, 0.06467323005199432, -0.5332865118980408, -0.022187333554029465, 0.144363626837...
javascript/reference/global_objects/atomics/waitasync/index.md
JavaScript - Global Objects - Atomics - waitAsync - Syntax - Parameters: - `typedArray`: An `Int32Array` or `BigInt64Array` that views a `SharedArrayBuffer`. - `index`: The position in the `typedArray` to wait on. - `value`: The expected value to test. - `timeout` (optional): Time to wait in milliseconds. `NaN` (and v...
[ 0.10582859814167023, -0.19404497742652893, -0.6072313785552979, 0.20255449414253235, -0.4264548420906067, -0.5854668021202087, -0.2807631492614746, 0.9716141223907471, 0.37964239716529846, 0.5928377509117126, -0.5045912265777588, -0.33057981729507446, -0.15321464836597443, 0.44128522276878...
javascript/reference/global_objects/atomics/waitasync/index.md
JavaScript - Global Objects - Atomics - waitAsync - Syntax - Return value: An `Object` with the following properties: - `async`: A boolean indicating whether the `value` property is a `Promise` or not. - `value`: If `async` is `false`, it will be a string which is either `"not-equal"` or `"timed-out"` (only when the ...
[ -0.6000229120254517, 0.5022879838943481, -0.0887426808476448, -0.12753936648368835, -0.7634460926055908, -1.0683808326721191, 0.894036054611206, 1.1883835792541504, -0.5584897994995117, 0.5447494983673096, -0.5702089667320251, 0.45902276039123535, -0.43626630306243896, 1.2844732999801636, ...
javascript/reference/global_objects/atomics/waitasync/index.md
JavaScript - Global Objects - Atomics - waitAsync - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not an `Int32Array` or `BigInt64Array` that views a `SharedArrayBuffer`. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ -0.3509496748447418, 0.06144723296165466, -0.45352664589881897, 0.2894061207771301, -0.3960723578929901, -0.6776796579360962, -0.8751778602600098, 0.8474772572517395, -0.011835627257823944, 0.024702806025743484, -0.23983822762966156, -0.29116421937942505, -0.15752090513706207, 0.1476037651...
javascript/reference/global_objects/atomics/waitasync/index.md
JavaScript - Global Objects - Atomics - waitAsync - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.582874596118927, 0.8298515677452087, -1.4994817972183228, -0.08607828617095947, -0.9730960726737976, -0.04019172117114067, 0.5681042075157166, 0.5907778739929199, 0.06821052730083466, -0.16358347237110138, 0.1642053872346878, 0.04690675064921379, -0.5500593185424805, -0.40374621748924255...
javascript/reference/global_objects/atomics/waitasync/index.md
JavaScript - Global Objects - Atomics - waitAsync - Examples - Using Atomics.waitAsync(): Given a shared `Int32Array`: Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); const int32 = new Int32Array(sab); A reading thread is sleeping and waiting on location 0 which ...
[ 0.4815419018268585, 0.7195468544960022, -0.4646731913089752, -0.09899575263261795, -0.16256402432918549, -0.88966965675354, -0.2705567181110382, 0.842706024646759, 0.2725013792514801, 0.40427544713020325, -0.08214305341243744, -0.23678357899188995, -0.062046900391578674, 0.4683600962162018...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange: The `Atomics.compareExchange()` static method exchanges a given replacement value at a given position in the array, if a given expected value equals the old value. It returns the old value at that position whether it was equal to the expected value or not. This ...
[ -0.1499842256307602, -0.5164994597434998, -1.0715574026107788, 0.1882050484418869, 0.05505247786641121, -2.386835813522339, 1.005752444267273, 1.2872568368911743, 0.275077223777771, 0.09861324727535248, -0.2549138069152832, -0.7254142165184021, 0.025647716596722603, 0.1311739683151245, -...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange - Syntax: Example: Atomics.compareExchange(typedArray, index, expectedValue, replacementValue)
[ 0.4242238998413086, -0.2792307436466217, -0.8818531632423401, -0.1634262353181839, -0.6387954354286194, -2.369983196258545, 0.0774267315864563, 1.0110926628112793, 0.4074547290802002, -0.515927255153656, -0.15788549184799194, -0.8943337798118591, -0.36731386184692383, 0.10695306211709976, ...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to exchange a `replacement...
[ 0.2099771648645401, -0.3052678406238556, -0.7797710299491882, 0.5044618844985962, 0.7369247674942017, -0.8226730823516846, 0.11835991591215134, 0.8794005513191223, 0.3037889301776886, 0.306665301322937, -0.30459603667259216, 0.18001142144203186, -0.4575771987438202, 0.33749833703041077, ...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange - Syntax - Return value: The old value at the given position (`typedArray[index]`). If the return value is equal to `expectedValue`, the exchange was successful; otherwise, the exchange failed.
[ 0.27264440059661865, -0.2416403442621231, -0.9090679287910461, 0.06640291213989258, -0.15995652973651886, -1.1011244058609009, 0.4460204839706421, 1.1480765342712402, -0.31742173433303833, 0.5949607491493225, -0.6224356889724731, 0.06569215655326843, -0.1788860410451889, 1.045855164527893,...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.06868691742420197, -0.30601999163627625, -0.44704103469848633, 0.33536890149116516, -0.12330660223960876, -1.828088641166687, -0.5090374946594238, 0.9460791349411011, -0.08928369730710983, -0.10813447833061218, -0.5053594708442688, -0.21325364708900452, -0.6196727752685547, -0.5467881560...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.7033540606498718, 0.568169891834259, -1.690084457397461, -0.04326597973704338, -0.6861106157302856, -0.46058961749076843, 0.866899311542511, 0.25843867659568787, 0.13835707306861877, -0.10318959504365921, 0.04613529145717621, -0.10695722699165344, -0.6261596083641052, -0.4377441108226776...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange - Examples - Using Atomics.compareExchange(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); // Create a view and set the value of the 0 index const ta = new Uint8Array(sab); ta[0] = 7; console.log(Atomics.c...
[ 0.465030312538147, 0.14987222850322723, -1.3061110973358154, 0.58354252576828, 0.1118088960647583, -1.689842939376831, 0.39741089940071106, 0.40912553668022156, 0.5970995426177979, 0.3239305913448334, -0.05953415483236313, -0.45065927505493164, -0.2584170699119568, -0.38943687081336975, ...
javascript/reference/global_objects/atomics/compareexchange/index.md
JavaScript - Global Objects - Atomics - compareExchange - Examples - Checking the return value: Compare-and-swap guarantees that the new value is calculated based on up-to-date information; if the value had been updated by another thread in the meantime, the write would fail. Therefore, you should check the return val...
[ 0.1959327608346939, 0.05577253922820091, -0.7843884825706482, 0.2527218461036682, 0.19524461030960083, -1.5262762308120728, 1.3565864562988281, 0.9331105351448059, -0.3399414122104645, -0.07255607843399048, -0.453230619430542, -0.5615121126174927, -0.8711621165275574, 0.5922375321388245, ...
javascript/reference/global_objects/atomics/add/index.md
JavaScript - Global Objects - Atomics - add: The `Atomics.add()` static method adds a given value at a given position in the array, and returns the old value at that position. This atomic operation guarantees that no other write happens until the modified value is written back.
[ 0.0078772297129035, 0.02709907665848732, -0.6512966156005859, 0.14459116756916046, -0.1970466822385788, -2.001376152038574, 1.4632006883621216, 0.9589437246322632, 0.2406855970621109, -0.16003429889678955, -0.7040063142776489, -0.6371278166770935, -0.19787070155143738, -0.09033571183681488...
javascript/reference/global_objects/atomics/add/index.md
JavaScript - Global Objects - Atomics - add - Syntax: Example: Atomics.add(typedArray, index, value)
[ 0.5535948872566223, -0.06184740737080574, -0.4351467490196228, 0.12643945217132568, -0.8787330389022827, -1.6721420288085938, 0.5651078820228577, 0.8527215719223022, 0.30913564562797546, -0.6667782068252563, -0.156691774725914, -0.5892114043235779, -0.3974388837814331, -0.18892663717269897...
javascript/reference/global_objects/atomics/add/index.md
JavaScript - Global Objects - Atomics - add - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to add a `value` to. - `value`: The nu...
[ 0.7609453201293945, -0.5534000992774963, -0.980806827545166, 0.11013403534889221, -0.12288159132003784, -1.0689791440963745, 0.0875682607293129, 0.9838296175003052, 0.3907723128795624, -0.10199326276779175, -0.583038866519928, 0.07152923941612244, -1.2192596197128296, 0.63313227891922, -...
javascript/reference/global_objects/atomics/add/index.md
JavaScript - Global Objects - Atomics - add - Syntax - Return value: The old value at the given position (`typedArray[index]`).
[ 0.6453396677970886, -0.25818559527397156, -1.017332673072815, -0.304076224565506, -0.6260137557983398, -1.8706551790237427, 0.6407314538955688, 1.1748641729354858, -0.08022195845842361, 0.01698002777993679, -0.6523357033729553, 0.1181105375289917, -0.5524513721466064, 0.9566323161125183, ...
javascript/reference/global_objects/atomics/add/index.md
JavaScript - Global Objects - Atomics - add - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.13043570518493652, -0.30909252166748047, -0.2283206582069397, 0.42826223373413086, -0.297652930021286, -1.8937077522277832, -0.4232665002346039, 0.7976884245872498, -0.2366042137145996, -0.21564185619354248, -0.720371663570404, -0.23378244042396545, -0.7414488792419434, -0.38237938284873...
javascript/reference/global_objects/atomics/add/index.md
JavaScript - Global Objects - Atomics - add - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.7357410192489624, 0.6085936427116394, -1.3579648733139038, -0.04254603758454323, -0.9088796377182007, -0.5232707262039185, 0.736312985420227, 0.2048204392194748, 0.17295394837856293, -0.34908944368362427, 0.08871661126613617, 0.11660963296890259, -0.7053546905517578, -0.4644813537597656,...
javascript/reference/global_objects/atomics/add/index.md
JavaScript - Global Objects - Atomics - add - Examples - Using Atomics.add(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); // Create a view and set the value of the 0 index const ta = new Uint8Array(sab); ta[0] = 7; // 7 + 12 = 19 console.log(Atomics.add(ta, 0,...
[ 0.5447232723236084, 0.48639994859695435, -0.9349201321601868, 0.5252369046211243, -0.3311927318572998, -1.328466773033142, 0.602061927318573, -0.10436969250440598, 0.611642599105835, -0.10804103314876556, -0.278812050819397, -0.006040738895535469, -0.5443974137306213, -0.278969407081604, ...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and: The `Atomics.and()` static method computes a bitwise AND with a given value at a given position in the array, and returns the old value at that position. This atomic operation guarantees that no other write happens until the modified value is written back.
[ 0.23437745869159698, 0.2697380781173706, -0.2842492461204529, 0.10443669557571411, -0.013341275975108147, -1.9153697490692139, 0.9528171420097351, 0.7326104640960693, 0.26657432317733765, 0.27892670035362244, -0.4433232545852661, -0.9734132289886475, 0.5590512156486511, -0.2785988450050354...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and - Syntax: Example: Atomics.and(typedArray, index, value)
[ 0.9427606463432312, 0.2788217067718506, -0.30439406633377075, -0.2552255392074585, -0.7046171426773071, -2.1462295055389404, -0.08333361893892288, 0.6229718923568726, 0.21573257446289062, -0.5405257940292358, -0.1899292767047882, -0.8343507647514343, -0.15070702135562897, -0.58559620380401...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to compute the bitwise AND. - `value`:...
[ 0.5418695211410522, 0.035222865641117096, -0.4917411208152771, 0.2602861523628235, 0.6485490798950195, -0.23554779589176178, 0.09371214359998703, 0.4467356204986572, 0.38000982999801636, 0.3477160930633545, -0.33315542340278625, -0.5642327070236206, 0.1279340237379074, 0.5379645824432373, ...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and - Syntax - Return value: The old value at the given position (`typedArray[index]`).
[ 0.6230893135070801, -0.13671398162841797, -0.9782488942146301, -0.4125848710536957, -0.5724785327911377, -2.0291638374328613, 0.46968746185302734, 1.043412685394287, -0.1319759488105774, 0.08235018700361252, -0.5775095224380493, 0.19054308533668518, -0.2639335095882416, 0.8164235353469849,...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.13375873863697052, -0.2169748842716217, -0.2009076029062271, 0.36964473128318787, -0.2072635143995285, -2.14162540435791, -0.616560697555542, 0.7254741191864014, -0.17240573465824127, -0.23583465814590454, -0.700263500213623, -0.2520349621772766, -0.5334042310714722, -0.5681486129760742,...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and - Description: The bitwise AND operation only yields 1, if both `a` and `b` are 1. The truth table for the AND operation is: - `a`: 0, `b`: 0, `a & b`: 0 - `a`: 0, `b`: 1, `a & b`: 0 - `a`: 1, `b`: 0, `a & b`: 0 - `a`: 1, `b`: 1, `a & b`: 1 For example, a bitwise AND of `5...
[ 0.12257992476224899, 0.5837710499763489, -1.5682722330093384, 0.35898837447166443, 0.19588534533977509, -1.4324262142181396, -0.3512451946735382, 1.3682174682617188, -0.06686824560165405, 0.6434435844421387, -0.9541435837745667, -1.1704682111740112, 0.564315915107727, -0.02430170215666294,...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.7951731085777283, 0.73845374584198, -1.5288752317428589, -0.21884271502494812, -0.9029964208602905, -0.5136058330535889, 0.6512244939804077, 0.08212372660636902, 0.1626323014497757, -0.3378768861293793, 0.1466682404279709, 0.06699962913990021, -0.6461215615272522, -0.6649265885353088, ...
javascript/reference/global_objects/atomics/and/index.md
JavaScript - Global Objects - Atomics - and - Examples - Using Atomics.and(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); // Create a view and set the value of the 0 index const ta = new Uint8Array(sab); ta[0] = 7; // 7 (0111) AND 10 (1010) = 2 (0010) console....
[ 0.7085698843002319, 0.6048983931541443, -0.9419996738433838, 0.6355985999107361, 0.00022030595573596656, -1.5825655460357666, 0.4644639790058136, -0.07058081030845642, 0.53814297914505, 0.29489460587501526, -0.3395686745643616, -0.19311542809009552, -0.0882096216082573, -0.6059190630912781...
javascript/reference/global_objects/atomics/load/index.md
JavaScript - Global Objects - Atomics - load: The `Atomics.load()` static method returns a value at a given position in the array. This atomic operation guarantees that the read is tear-free, and that all atomic reads are sequentially consistent.
[ 0.011566037312150002, -0.30558302998542786, -0.9210988283157349, -0.8058764934539795, 0.20342808961868286, -1.8408499956130981, 1.2932591438293457, 0.8163830637931824, -0.06695479154586792, 0.15141211450099945, -0.322521448135376, -0.6878527998924255, 0.050599537789821625, 0.05836635455489...
javascript/reference/global_objects/atomics/load/index.md
JavaScript - Global Objects - Atomics - load - Syntax: Example: Atomics.load(typedArray, index)
[ 0.7931634187698364, -0.010040855966508389, -0.6764082312583923, -0.33321744203567505, -0.8857847452163696, -1.752596378326416, 0.6962041854858398, 1.0068325996398926, -0.2775685787200928, -0.8207001090049744, -0.10018038004636765, -0.2061687856912613, -0.4925704300403595, -0.09255929291248...
javascript/reference/global_objects/atomics/load/index.md
JavaScript - Global Objects - Atomics - load - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to load from.
[ 0.7273224592208862, -0.665274441242218, -1.2765576839447021, -0.08224300295114517, -0.00320864818058908, -0.990536630153656, 0.18875260651111603, 0.9805848002433777, 0.12950299680233002, -0.20066852867603302, -0.3892652690410614, 0.13259777426719666, -1.2990391254425049, 0.4275375902652740...
javascript/reference/global_objects/atomics/load/index.md
JavaScript - Global Objects - Atomics - load - Syntax - Return value: The value at the given position (`typedArray[index]`).
[ 0.689453125, -0.37358176708221436, -0.7252487540245056, -0.6994628310203552, -0.5427349209785461, -1.273199439048767, 0.6738928556442261, 1.0401115417480469, -0.06632710993289948, 0.025058632716536522, -0.24228467047214508, 0.3659816384315491, -0.3501165807247162, 0.7170838713645935, -0....
javascript/reference/global_objects/atomics/load/index.md
JavaScript - Global Objects - Atomics - load - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.13476210832595825, -0.23995983600616455, -0.33131206035614014, 0.2740064263343811, -0.2855680286884308, -1.9738620519638062, -0.4331740140914917, 0.8989814519882202, -0.2948524057865143, -0.26719754934310913, -0.6723901629447937, -0.09860532730817795, -0.7387132048606873, -0.563508868217...
javascript/reference/global_objects/atomics/load/index.md
JavaScript - Global Objects - Atomics - load - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.7795435190200806, 0.6353000998497009, -1.5819497108459473, -0.25064438581466675, -0.9066780805587769, -0.3058915138244629, 0.8913848400115967, 0.34677404165267944, 0.02344703860580921, -0.4127802550792694, 0.2072657197713852, 0.1343744546175003, -0.7938119173049927, -0.48658257722854614,...
javascript/reference/global_objects/atomics/load/index.md
JavaScript - Global Objects - Atomics - load - Examples - Using Atomics.load(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); // Create a view and set the value of the 0 index const ta = new Uint8Array(sab); ta[0] = 7; Atomics.add(ta, 0, 12); // Add 12 to index ...
[ 0.34035271406173706, 0.2122659981250763, -0.713791012763977, 0.6428308486938477, -0.12208108603954315, -0.9175095558166504, 0.7265899181365967, 0.0021600991021841764, 0.25279465317726135, -0.3248916566371918, -0.15644867718219757, 0.15355749428272247, -0.3746563196182251, -0.48750287294387...
javascript/reference/global_objects/atomics/sub/index.md
JavaScript - Global Objects - Atomics - sub: The `Atomics.sub()` static method subtracts a given value at a given position in the array, and returns the old value at that position. This atomic operation guarantees that no other write happens until the modified value is written back.
[ -0.49945563077926636, -0.06550727039575577, -0.7893784642219543, 0.09239017218351364, 0.03905103728175163, -1.8127853870391846, 1.615719199180603, 0.7111770510673523, 0.23464606702327728, 0.25561150908470154, -0.714348554611206, -0.868205189704895, 0.17644301056861877, 0.016093164682388306...
javascript/reference/global_objects/atomics/sub/index.md
JavaScript - Global Objects - Atomics - sub - Syntax: Example: Atomics.sub(typedArray, index, value)
[ 0.2514801621437073, -0.38647815585136414, -0.5844369530677795, -0.1657899171113968, -0.7881501317024231, -1.6205110549926758, 0.3444817364215851, 0.5212998390197754, 0.17173601686954498, -0.463981032371521, -0.19767476618289948, -0.6983326077461243, 0.029688427224755287, -0.183036744594573...
javascript/reference/global_objects/atomics/sub/index.md
JavaScript - Global Objects - Atomics - sub - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to subtract a `value` from. - `value`:...
[ 0.5054244995117188, -0.6872909665107727, -1.2060314416885376, -0.013038991950452328, 0.1591012328863144, -1.0907529592514038, -0.1726481318473816, 0.8839651942253113, 0.46610593795776367, 0.1826518326997757, -0.6549087762832642, -0.1407478153705597, -1.0679528713226318, 0.5212037563323975,...
javascript/reference/global_objects/atomics/sub/index.md
JavaScript - Global Objects - Atomics - sub - Syntax - Return value: The old value at the given position (`typedArray[index]`).
[ 0.40708276629447937, -0.33010727167129517, -1.1515517234802246, -0.3738586902618408, -0.5702589750289917, -1.7781026363372803, 0.6223158836364746, 1.076066017150879, -0.24703823029994965, 0.08953440934419632, -0.6785068511962891, 0.20672352612018585, -0.2766004204750061, 0.9770021438598633...
javascript/reference/global_objects/atomics/sub/index.md
JavaScript - Global Objects - Atomics - sub - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.055368099361658096, -0.34772413969039917, -0.32962071895599365, 0.4448377788066864, -0.24242904782295227, -1.9566938877105713, -0.5454707145690918, 0.7695907950401306, -0.2407405972480774, -0.20394159853458405, -0.752023458480835, -0.14995458722114563, -0.5225542187690735, -0.51729154586...
javascript/reference/global_objects/atomics/sub/index.md
JavaScript - Global Objects - Atomics - sub - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.7476823329925537, 0.5122016072273254, -1.5935887098312378, -0.05875979736447334, -0.81578528881073, -0.39865267276763916, 0.7149345874786377, 0.06431317329406738, 0.042588189244270325, -0.3522609770298004, 0.08107905089855194, 0.024888619780540466, -0.5427224636077881, -0.496656924486160...
javascript/reference/global_objects/atomics/sub/index.md
JavaScript - Global Objects - Atomics - sub - Examples - Using Atomics.sub(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); // Create a view and set the value of the 0 index const ta = new Uint8Array(sab); ta[0] = 48; // 48 - 12 = 36 console.log(Atomics.sub(ta, ...
[ 0.2309291660785675, -0.16128918528556824, -1.1512640714645386, 0.5032629370689392, -0.07105141878128052, -0.5937954783439636, 0.7076839804649353, -0.21783602237701416, 0.34453606605529785, 0.21004442870616913, -0.10990313440561295, -0.2730313539505005, -0.06583461165428162, -0.350756764411...
javascript/reference/global_objects/atomics/islockfree/index.md
JavaScript - Global Objects - Atomics - isLockFree: The `Atomics.isLockFree()` static method is used to determine whether the `Atomics` methods use locks or atomic hardware operations when applied to typed arrays with the given element byte size. It is intended as an optimization primitive, so that high-performance al...
[ 0.5352054834365845, -0.37638166546821594, -1.2135846614837646, -0.0793568417429924, 0.2468455284833908, -1.9711949825286865, 1.8653267621994019, 0.4100522994995117, 0.4232960045337677, 0.7983806133270264, -1.1957656145095825, -1.0216518640518188, 0.15081223845481873, 0.0273292176425457, ...
javascript/reference/global_objects/atomics/islockfree/index.md
JavaScript - Global Objects - Atomics - isLockFree - Syntax: Example: Atomics.isLockFree(size)
[ 0.8216899633407593, 0.44138413667678833, -0.8373923301696777, -0.9997077584266663, -0.902803897857666, -2.353850841522217, 1.146711826324463, 0.788942277431488, 0.46143487095832825, -0.42590174078941345, -0.9008111357688904, -0.6862411499023438, -0.05456027016043663, 0.004890754818916321, ...
javascript/reference/global_objects/atomics/islockfree/index.md
JavaScript - Global Objects - Atomics - isLockFree - Syntax - Parameters: - `size`: The size in bytes to check.
[ 0.8387591242790222, 0.6654704809188843, -1.3841924667358398, -1.0315271615982056, -0.2698192596435547, -1.85649573802948, 1.017289638519287, 0.1236300840973854, 0.31360170245170593, -0.6232380270957947, -1.2452553510665894, 0.016253698617219925, 0.08466441929340363, 0.050187498331069946, ...
javascript/reference/global_objects/atomics/islockfree/index.md
JavaScript - Global Objects - Atomics - isLockFree - Syntax - Return value: A `true` or `false` value indicating whether the operation is lock free. - Always `true` if `size` is 4, because all known platforms support 4-byte atomic operations. - Always `false` if the given size is not one of the `BYTES_PER_ELEMENT` pr...
[ 0.40784746408462524, 0.37414905428886414, -0.8454039692878723, -0.22286275029182434, -0.1663486361503601, -1.5693657398223877, 1.1900883913040161, 0.7453859448432922, 0.2763320803642273, 0.06081076338887215, -0.9509556889533997, -0.24365264177322388, 0.28747305274009705, 0.2825564444065094...
javascript/reference/global_objects/atomics/islockfree/index.md
JavaScript - Global Objects - Atomics - isLockFree - Examples - Using Atomics.isLockFree(): Example: Atomics.isLockFree(1); // true (platform-dependent) Atomics.isLockFree(2); // true (platform-dependent) Atomics.isLockFree(3); // false Atomics.isLockFree(4); // true Atomics.isLockFree(5); // false Atomics.isLockFree...
[ 0.5976517200469971, 0.45267048478126526, -0.47458451986312866, -0.41479095816612244, -0.3174799978733063, -2.634330987930298, 1.2347710132598877, 0.5354666113853455, 0.06912559270858765, -0.13336941599845886, -1.0341144800186157, -0.7663565874099731, 0.3318634331226349, 0.16746215522289276...
javascript/reference/global_objects/atomics/exchange/index.md
JavaScript - Global Objects - Atomics - exchange: The `Atomics.exchange()` static method exchanges a given value at a given position in the array, and returns the old value at that position. This atomic operation guarantees that no other write happens between the read of the old value and the write of the new value.
[ -0.049528323113918304, -0.4281374216079712, -0.9198008179664612, 0.09188935160636902, 0.039317503571510315, -2.0533323287963867, 0.9981621503829956, 1.2235469818115234, 0.5319538712501526, -0.1734476089477539, -0.22677284479141235, -0.7477571368217468, 0.14961440861225128, 0.06199838593602...
javascript/reference/global_objects/atomics/exchange/index.md
JavaScript - Global Objects - Atomics - exchange - Syntax: Example: Atomics.exchange(typedArray, index, value)
[ 0.5557035803794861, -0.5073707103729248, -0.8013688921928406, -0.04490469768643379, -0.7389369010925293, -1.9974545240402222, 0.1217755600810051, 1.1449570655822754, 0.39086660742759705, -0.5947603583335876, 0.10975509136915207, -0.6998000741004944, -0.19396188855171204, 0.0230975765734910...
javascript/reference/global_objects/atomics/exchange/index.md
JavaScript - Global Objects - Atomics - exchange - Syntax - Parameters: - `typedArray`: An integer typed array. One of `Int8Array`, `Uint8Array`, `Int16Array`, `Uint16Array`, `Int32Array`, `Uint32Array`, `BigInt64Array`, or `BigUint64Array`. - `index`: The position in the `typedArray` to exchange a `value`. - `value`:...
[ 0.7231048345565796, -0.7460561990737915, -1.2738139629364014, 0.17311546206474304, 0.06475277245044708, -1.0139665603637695, -0.3409799337387085, 1.2696130275726318, 0.5971789360046387, -0.009982386603951454, -0.21006228029727936, 0.16428884863853455, -0.8498188257217407, 0.727684378623962...
javascript/reference/global_objects/atomics/exchange/index.md
JavaScript - Global Objects - Atomics - exchange - Syntax - Return value: The old value at the given position (`typedArray[index]`).
[ 0.5549575686454773, -0.302123486995697, -1.1172348260879517, -0.24102216958999634, -0.5243027806282043, -1.8685868978500366, 0.4481547474861145, 1.42177152633667, -0.02850501239299774, 0.11765442788600922, -0.49338844418525696, 0.2489427924156189, -0.3364638090133667, 0.9860982298851013, ...
javascript/reference/global_objects/atomics/exchange/index.md
JavaScript - Global Objects - Atomics - exchange - Syntax - Exceptions: - `TypeError`: Thrown if `typedArray` is not one of the allowed integer types. - `RangeError`: Thrown if `index` is out of bounds in the `typedArray`.
[ 0.12121835350990295, -0.3478087782859802, -0.35948505997657776, 0.5679325461387634, -0.27599993348121643, -1.9220213890075684, -0.6175758242607117, 1.0083212852478027, -0.23583021759986877, -0.2243518829345703, -0.5544884204864502, -0.118352510035038, -0.58180832862854, -0.3557872772216797...
javascript/reference/global_objects/atomics/exchange/index.md
JavaScript - Global Objects - Atomics - exchange - Examples: Note that these examples cannot be run directly from the console or an arbitrary web page, because `SharedArrayBuffer` is not defined unless its security requirements are met.
[ 0.67872154712677, 0.46438097953796387, -1.7127546072006226, 0.20964433252811432, -0.7999668717384338, -0.26166439056396484, 0.5798051357269287, 0.46348172426223755, 0.25218403339385986, -0.3383287191390991, 0.12874269485473633, 0.08799226582050323, -0.6404091715812683, -0.34691354632377625...
javascript/reference/global_objects/atomics/exchange/index.md
JavaScript - Global Objects - Atomics - exchange - Examples - Using Atomics.exchange(): Example: // Create a SharedArrayBuffer with a size in bytes const sab = new SharedArrayBuffer(1024); // Create a view and set the value of the 0 index const ta = new Uint8Array(sab); ta[0] = 7; console.log(Atomics.exchange(ta, 0,...
[ 0.387809693813324, -0.09922191500663757, -1.044173002243042, 0.9751662611961365, -0.008577468805015087, -1.494075059890747, 0.2806521952152252, 0.31386440992355347, 0.6327352523803711, 0.12630151212215424, 0.09468782693147659, -0.13741756975650787, -0.1690494567155838, -0.4465831220149994,...
javascript/reference/global_objects/atomics/wait/index.md
JavaScript - Global Objects - Atomics - wait: The `Atomics.wait()` static method verifies that a shared memory location contains a given value and if so sleeps, awaiting a wake-up notification or a time out. It returns a string which is `"not-equal"` if the memory location does not match the given value, `"ok"` if wok...
[ 0.2767748534679413, -0.12912650406360626, -0.4988706111907959, -0.40260785818099976, -0.5597070455551147, -2.138338327407837, 0.4653964638710022, 0.2930120825767517, -0.20439492166042328, 0.23358598351478577, -0.4543224275112152, -0.7486668825149536, 0.1847386360168457, 0.6527860760688782,...
javascript/reference/global_objects/atomics/wait/index.md
JavaScript - Global Objects - Atomics - wait - Syntax: Example: Atomics.wait(typedArray, index, value) Atomics.wait(typedArray, index, value, timeout)
[ 0.4559256136417389, 0.09915877878665924, -0.4593924283981323, -0.16441844403743744, -0.6197835803031921, -1.5129432678222656, -0.4695703983306885, 0.9683544039726257, -0.09399554878473282, -0.3934330642223358, -0.053468093276023865, -0.5273562669754028, -0.25902941823005676, 0.150588050484...
javascript/reference/global_objects/atomics/wait/index.md
JavaScript - Global Objects - Atomics - wait - Syntax - Parameters: - `typedArray`: An `Int32Array` or `BigInt64Array` that views a `SharedArrayBuffer`. - `index`: The position in the `typedArray` to wait on. - `value`: The expected value to test. - `timeout` (optional): Time to wait in milliseconds. `NaN` (and values...
[ 0.06646312028169632, -0.262886106967926, -0.5666654109954834, 0.0845537856221199, -0.22819507122039795, -0.8156717419624329, -0.4041370451450348, 0.7957261800765991, 0.27668851613998413, 0.5026898384094238, -0.534691572189331, -0.43398311734199524, -0.21589672565460205, 0.507621705532074, ...
javascript/reference/global_objects/atomics/wait/index.md
JavaScript - Global Objects - Atomics - wait - Syntax - Return value: A string which is either `"not-equal"`, `"ok"`, or `"timed-out"`. - `"not-equal"` is returned immediately if the initial `value` does not equal what is stored at `index`. - `"ok"` is returned if woken up by a call to `Atomics.notify()`, regardless ...
[ -0.0632157027721405, 0.2649623155593872, -0.2902919352054596, -0.5207160115242004, -0.6711282134056091, -1.961057424545288, 1.016151785850525, 0.9564040303230286, -0.8214700222015381, 0.4386361241340637, -0.36146339774131775, 0.22160367667675018, -0.7259336113929749, 0.8096747398376465, ...
javascript/reference/global_objects/atomics/wait/index.md
JavaScript - Global Objects - Atomics - wait - Syntax - Exceptions: - `TypeError`: Thrown in one of the following cases: - If `typedArray` is not an `Int32Array` or `BigInt64Array` that views a `SharedArrayBuffer`. - If the current thread cannot be blocked (for example, because it's the main thread). - `RangeError...
[ 0.15889792144298553, -0.20875464379787445, -0.34477338194847107, 0.20866233110427856, -0.36547937989234924, -1.1872583627700806, -0.8907192945480347, 0.6292516589164734, -0.1528787463903427, -0.03717702999711037, -0.28288257122039795, -0.3293055295944214, -0.45713263750076294, 0.1318097263...