file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
javascript/reference/functions/arrow_functions/index.md
JavaScript - Functions - Arrow functions - Description - Line break before arrow: An arrow function cannot contain a line break between its parameters and its arrow. Example: const func = (a, b, c) => 1; // SyntaxError: Unexpected token '=>' For the purpose of formatting, you may put the line break after the arro...
[ -0.03571135550737381, 0.05810549855232239, -1.4685341119766235, 0.44474348425865173, 0.4161890745162964, -1.009102463722229, 0.10123679041862488, 1.2658263444900513, -0.05123922601342201, -0.47980424761772156, 0.2529054582118988, -0.4324686825275421, 0.6375611424446106, -0.4865239560604095...
javascript/reference/functions/arrow_functions/index.md
JavaScript - Functions - Arrow functions - Description - Precedence of arrow: Although the arrow in an arrow function is not an operator, arrow functions have special parsing rules that interact differently with operator precedence compared to regular functions. Example: let callback; callback = callback || () => {...
[ 0.02248903550207615, 0.12191478908061981, -1.4554381370544434, 0.6488906145095825, -0.2997399866580963, -1.5593806505203247, 1.1157876253128052, 1.4581431150436401, -0.17903417348861694, 0.29720231890678406, -0.47744253277778625, -1.357509970664978, 0.273518443107605, -0.1031636968255043, ...
javascript/reference/functions/arrow_functions/index.md
JavaScript - Functions - Arrow functions - Examples - Using arrow functions: Example: // An empty arrow function returns undefined const empty = () => {}; (() => "foobar")(); // Returns "foobar" // (this is an Immediately Invoked Function Expression) const simple = (a) => (a > 15 ? 15 : a); simple(16); // 15 simple...
[ -0.0007552378810942173, -0.33955374360084534, -1.8119783401489258, 0.6889874935150146, -0.38217809796333313, -0.9914987683296204, 1.096184492111206, 1.4170823097229004, -0.3112468719482422, 0.31014347076416016, 0.09004697948694229, -0.06268256157636642, 0.3037191331386566, -0.0501709729433...
javascript/reference/functions/arrow_functions/index.md
JavaScript - Functions - Arrow functions - Examples - Using call, bind, and apply: The `call()`, `apply()`, and `bind()` methods work as expected with traditional functions, because we establish the scope for each of the methods: Example: const obj = { num: 100, }; // Setting "num" on globalThis to show how it is...
[ -0.06207231059670448, 0.5180051326751709, -1.1559362411499023, 0.14817334711551666, 0.57600337266922, -0.489842027425766, 0.23379011452198029, 0.15624645352363586, -0.4496297240257263, 0.04423303157091141, -0.9657763242721558, 0.07111035287380219, -0.7970842123031616, 0.9361158013343811, ...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters: The rest parameter syntax allows a function to accept an indefinite number of arguments as an array, providing a way to represent variadic functions in JavaScript. Example: function sum(...theArgs) { let total = 0; for (const arg of theArgs) { total += arg; } ret...
[ -0.22423750162124634, 0.030598441138863564, -1.6218904256820679, 1.1902801990509033, -0.2527632713317871, -1.7084102630615234, 0.42046675086021423, 0.8727552890777588, -0.37584593892097473, -0.590056300163269, -0.7519124746322632, 0.9110918641090393, -0.05017470195889473, 0.166119411587715...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters - Syntax: Example: function f(a, b, ...theArgs) { // … } There are some additional syntax restrictions: - A function definition can only have one rest parameter. - The rest parameter must be the last parameter in the function definition. - Trailing commas are not allowed a...
[ 0.123183973133564, 0.2608644664287567, -1.1501927375793457, 0.6830334067344666, -0.15717045962810516, -1.6326396465301514, 0.5336518883705139, 1.4848958253860474, -0.1201426237821579, -0.5834966897964478, -0.8355025053024292, 0.5065296292304993, 0.28504234552383423, -0.1393260508775711, ...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters - Description: A function definition's last parameter can be prefixed with `...` (three U+002E FULL STOP characters), which will cause all remaining (user supplied) parameters to be placed within an `Array` object. Example: function myFun(a, b, ...manyMoreArgs) { console.lo...
[ 0.1273934692144394, 0.035572655498981476, -1.6170579195022583, 0.7233353853225708, 0.1908799558877945, -1.3554199934005737, 0.8834956288337708, 0.6455693244934082, 0.01291641779243946, -0.2706165313720703, -0.11677023023366928, 0.33891570568084717, 0.5846325755119324, 0.4332124590873718, ...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters - Description - The difference between rest parameters and the arguments object: There are four main differences between rest parameters and the `arguments` object: - The `arguments` object is not a real array, while rest parameters are `Array` instances, meaning methods like ...
[ 0.28249797224998474, -0.6124393939971924, -1.6568849086761475, 1.2152163982391357, -0.34870392084121704, -2.194239616394043, 0.6632270216941833, 0.8187428116798401, 0.4428395926952362, -0.10183430463075638, -0.44929933547973633, -0.16308724880218506, -0.09811892360448837, 0.154248923063278...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters - Examples - Using rest parameters: In this example, the first argument is mapped to `a` and the second to `b`, so these named arguments are used as normal. However, the third argument, `manyMoreArgs`, will be an array that contains the third, fourth, fifth, sixth, …, nth — as...
[ 0.13061654567718506, -0.26379597187042236, -1.2127933502197266, -0.20068494975566864, 0.2394787222146988, -0.7688949108123779, 0.6716434359550476, 0.6610988974571228, 0.09787788987159729, -0.2279738485813141, -0.010165432468056679, -0.33310461044311523, -0.06960729509592056, 0.180133432149...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters - Examples - Argument length: Since `theArgs` is an array, a count of its elements is given by the `length` property. If the function's only parameter is a rest parameter, `restParams.length` will be equal to `arguments.length`. Example: function fun1(...theArgs) { console....
[ 0.2591327428817749, -0.030771374702453613, -1.654159426689148, 0.3640771508216858, -0.794349193572998, -2.0099990367889404, 0.6859743595123291, 0.7861460447311401, -0.5443706512451172, -0.13392461836338043, -0.6937704086303711, 0.04236432537436485, -0.5347306132316589, 0.6085588335990906, ...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters - Examples - Using rest parameters in combination with ordinary parameters: In the next example, a rest parameter is used to collect all parameters after the first parameter into an array. Each one of the parameter values collected into the array is then multiplied by the first...
[ 0.15229645371437073, 0.34944280982017517, -2.0913350582122803, 0.6698825359344482, -0.9114761352539062, -0.9057105183601379, 1.1700024604797363, 0.10012103617191315, 0.1263899952173233, -0.2806835174560547, -0.49064409732818604, 0.751794695854187, -0.155345618724823, 0.20576168596744537, ...
javascript/reference/functions/rest_parameters/index.md
JavaScript - Functions - rest parameters - Examples - From arguments to an array: `Array` methods can be used on rest parameters, but not on the `arguments` object: Example: function sortRestArgs(...theArgs) { const sortedArgs = theArgs.sort(); return sortedArgs; } console.log(sortRestArgs(5, 3, 7, 1)); // 1, 3...
[ 0.6621868014335632, 0.01595402881503105, -1.355578064918518, 0.272720068693161, 0.3283624053001404, -0.6031616926193237, 0.03458597883582115, 0.6876556277275085, 0.010080473497509956, -0.1975214183330536, 0.3075801432132721, 0.40598800778388977, 0.1837407946586609, 0.5089955925941467, -0...
javascript/reference/functions/default_parameters/index.md
JavaScript - Functions - Default parameters: Default function parameters allow named parameters to be initialized with default values if no value or `undefined` is passed. Example: function multiply(a, b = 1) { return a * b; } console.log(multiply(5, 2)); // Expected output: 10 console.log(multiply(5)); // Expec...
[ -0.06750082224607468, 0.09998142719268799, -1.9559433460235596, 1.0907703638076782, -0.2518515884876251, -0.07683868706226349, 1.3961490392684937, 1.201500654220581, -0.1971922367811203, -0.04218864068388939, -0.821138322353363, -0.2113436460494995, -0.4146241247653961, 0.2554404139518738,...
javascript/reference/functions/default_parameters/index.md
JavaScript - Functions - Default parameters - Syntax: Example: function fnName(param1 = defaultValue1, /* …, */ paramN = defaultValueN) { // … }
[ -0.42742881178855896, 0.3420822024345398, -0.9973989129066467, 0.37321388721466064, -0.43368443846702576, -1.0591254234313965, 1.33578360080719, 2.081615686416626, -0.41559550166130066, 0.2995372414588928, -1.0657941102981567, 0.05309624969959259, -0.9776387214660645, -0.10544025897979736,...
javascript/reference/functions/default_parameters/index.md
JavaScript - Functions - Default parameters - Description: In JavaScript, function parameters default to `undefined`. However, it's often useful to set a different default value. This is where default parameters can help. In the following example, if no value is provided for `b` when `multiply` is called, `b`'s value...
[ 0.09181588888168335, -0.3525841236114502, -1.2716729640960693, 0.3858698606491089, 0.8038437366485596, -0.5662413239479065, 0.612223744392395, 0.7184019684791565, -0.45440346002578735, -0.3310404419898987, -0.2581889033317566, 0.4045802354812622, -0.39849382638931274, 0.2200203537940979, ...
javascript/reference/functions/default_parameters/index.md
JavaScript - Functions - Default parameters - Examples - Passing undefined vs. other falsy values: In the second call in this example, even if the first argument is set explicitly to `undefined` (though not `null` or other `falsy` values), the value of the `num` argument is still the default. Example: function test(...
[ -0.70961993932724, 0.07098092138767242, -1.2472702264785767, 0.4228600263595581, -0.2531215250492096, -0.8634448051452637, 1.4810243844985962, 0.814281702041626, -0.1636824607849121, 0.5308118462562561, -0.35387295484542847, -0.2989567220211029, 0.1547381579875946, -0.31598803400993347, ...
javascript/reference/functions/default_parameters/index.md
JavaScript - Functions - Default parameters - Examples - Evaluated at call time: The default argument is evaluated at call time. Unlike with Python (for example), a new object is created each time the function is called. Example: function append(value, array = []) { array.push(value); return array; } append(1);...
[ -0.21064992249011993, 0.0524662584066391, -1.1405917406082153, 0.8713905215263367, -0.12383726984262466, -1.3696088790893555, 0.641427218914032, 0.9642365574836731, -0.11633781343698502, 0.510014533996582, -0.07766543328762054, -0.342243492603302, -0.16236647963523865, 0.4879433810710907, ...
javascript/reference/functions/default_parameters/index.md
JavaScript - Functions - Default parameters - Examples - Earlier parameters are available to later default parameters: Parameters defined earlier (to the left) are available to later default parameters: Example: function greet(name, greeting, message = `${greeting} ${name}`) { return [name, greeting, message]; } ...
[ -0.14983634650707245, -0.3884107768535614, -0.9562892317771912, 0.6655122637748718, -0.27120280265808105, -1.5941412448883057, 1.3207268714904785, 0.9554940462112427, 0.21989701688289642, -0.3019319474697113, -0.9576321840286255, -0.04349455609917641, 0.1723591536283493, 0.1397911757230758...
javascript/reference/functions/default_parameters/index.md
JavaScript - Functions - Default parameters - Examples - Destructured parameter with default value assignment: You can use default value assignment with the destructuring syntax. A common way of doing that is to set an empty object/array as the default value for the destructured parameter; for example: `[x = 1, y = 2...
[ 0.18302012979984283, 0.19033372402191162, -1.270811676979065, 1.0876284837722778, 0.03138270601630211, -1.1568810939788818, 2.1259100437164307, 0.9015628099441528, -0.07287866622209549, 0.30846044421195984, -0.6171812415122986, -0.09550005942583084, 0.14442454278469086, 0.2006852626800537,...
javascript/reference/execution_model/index.md
JavaScript - Execution model: This page introduces the basic infrastructure of the JavaScript runtime environment. The model is largely theoretical and abstract, without any platform-specific or implementation-specific details. Modern JavaScript engines heavily optimize the described semantics. This page is a referen...
[ -0.5838342308998108, 0.22170785069465637, -1.3995592594146729, 0.5785669088363647, -0.6447736620903015, -1.0986982583999634, 0.7169867753982544, 1.3963499069213867, 0.4421343207359314, -0.05666414275765419, -0.885317325592041, -0.9354448914527893, -0.13141587376594543, 0.27476054430007935,...
javascript/reference/execution_model/index.md
JavaScript - Execution model - The engine and the host: JavaScript execution requires the cooperation of two pieces of software: the JavaScript engine and the host environment. The JavaScript engine implements the ECMAScript (JavaScript) language, providing the core functionality. It takes source code, parses it, and...
[ -0.026100510731339455, -0.15766195952892303, -1.0543593168258667, 0.30768582224845886, -0.4123919606208801, -0.719163715839386, 0.4303508400917053, 0.19562622904777527, 0.34111645817756653, 0.1948052942752838, -0.6601228713989258, 0.014474802650511265, -1.1399253606796265, -0.4362295567989...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Agent execution model: In the JavaScript specification, each autonomous executor of JavaScript is called an agent, which maintains its facilities for code execution: - Heap (of objects): this is just a name to denote a large (mostly unstructured) region of memory. It gets populated as o...
[ 0.8399059176445007, -0.11670805513858795, -0.731347382068634, 0.34724804759025574, 0.6387578845024109, -1.18607759475708, 0.7458433508872986, 0.9507248997688293, -0.3289254605770111, 0.1838996410369873, -0.1832607090473175, 0.08015953004360199, 0.22925107181072235, 0.5317832827568054, 0....
javascript/reference/execution_model/index.md
JavaScript - Execution model - Realms: Each agent owns one or more realms. Each piece of JavaScript code is associated with a realm when it's loaded, which remains the same even when called from another realm. A realm consists of the following information: - A list of intrinsic objects like `Array`, `Array.prototype`...
[ -0.05919425189495087, -0.2085980772972107, -0.6938701868057251, 0.39535772800445557, 0.45000961422920227, -1.3856385946273804, 0.27071768045425415, 0.9894091486930847, -0.22566744685173035, -0.16223138570785522, -0.2464143931865692, 0.204056054353714, -0.221250981092453, 0.1737553179264068...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Stack and execution contexts: We first consider synchronous code execution. Each job enters by calling its associated callback. Code inside this callback may create variables, call functions, or exit. Each function needs to keep track of its own variable environments and where to return ...
[ -0.09563161432743073, -0.28886404633522034, -1.3533090353012085, 0.7324408888816833, 0.627066433429718, -0.5300487875938416, 0.22874505817890167, 0.6988728046417236, 0.1338815987110138, 0.23259632289409637, -0.5068240761756897, -0.5215926766395569, -0.27181917428970337, 0.7856324911117554,...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Stack and execution contexts - Generators and reentry: When a frame is popped, it's not necessarily gone forever, because sometimes we need to come back to it. For example, consider a generator function: Example: function* gen() { console.log(1); yield; console.log(2); } const g...
[ -0.2880048453807831, -0.3756575882434845, -1.2825261354446411, 0.21709536015987396, -0.1318308413028717, -2.037614345550537, 0.24028417468070984, 1.4802576303482056, -0.30921319127082825, 0.5713508129119873, -0.08133179694414139, -0.4426432251930237, -0.3485533595085144, 0.6849074363708496...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Stack and execution contexts - Tail calls: One mechanism defined in the specification is proper tail call (PTC). A function call is a tail call if the caller does nothing after the call except return the value: Example: function f() { return g(); } In this case, the call to `g` is a...
[ -0.831591010093689, -1.1760269403457642, -1.3409578800201416, 0.5863714218139648, 0.41249626874923706, -0.33636435866355896, 0.8481191396713257, 0.47998347878456116, -0.8630759716033936, 1.3869612216949463, -0.711677610874176, -0.8605872392654419, 0.005682309623807669, 0.5812058448791504, ...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Stack and execution contexts - Closures: Another interesting phenomenon related to variable scoping and function calls is closures. Whenever a function is created, it also memorizes internally the variable bindings of the current running execution context. Then, these variable bindings c...
[ -0.9557353854179382, -0.45544078946113586, -1.4803282022476196, 1.1517735719680786, -0.3317424952983856, -0.8968521356582642, 0.41056618094444275, 1.2744048833847046, 0.7667840123176575, -0.30575406551361084, -0.6448196172714233, 0.0019608119037002325, -0.06463214010000229, 0.1272175312042...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Job queue and event loop: An agent is a thread, which means the interpreter can only process one statement at a time. When the code is all synchronous, this is fine because we can always make progress. But if the code needs to perform asynchronous action, then we cannot progress unless t...
[ -0.44590145349502563, -0.23631426692008972, -0.7501459121704102, 0.2503626048564911, 0.020772989839315414, -0.8033141493797302, 0.28779494762420654, 0.931725025177002, -0.3559045195579529, 1.0589476823806763, 0.05352170020341873, -1.0463008880615234, 0.27648770809173584, 0.782711923122406,...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Job queue and event loop - "Run-to-completion": Each job is processed completely before any other job is processed. This offers some nice properties when reasoning about your program, including the fact that whenever a function runs, it cannot be preempted and will run entirely before an...
[ -1.2249596118927002, -0.10855943709611893, -1.1331154108047485, 0.702305257320404, -0.43381577730178833, -0.7753036618232727, 0.049052584916353226, 1.637731909751892, -0.0710296481847763, -0.03984130918979645, -0.5527514815330505, -0.43121764063835144, 0.6484737396240234, 0.742418825626373...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Job queue and event loop - Never blocking: Another important guarantee offered by the event loop model is that JavaScript execution is never blocking. Handling I/O is typically performed via events and callbacks, so when the application is waiting for an IndexedDB query to return or a `f...
[ -0.5453700423240662, -0.293041467666626, -1.1936817169189453, 0.7060580849647522, -0.955023467540741, -0.8150587677955627, 0.474953293800354, 0.30980125069618225, -0.8094647526741028, 0.32774001359939575, 0.19555038213729858, -0.745863139629364, -0.009120619855821133, 0.9263263940811157, ...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Agent clusters and memory sharing: Multiple agents can communicate via memory sharing, forming an agent cluster. Agents are within the same cluster if and only if they can share memory. There is no built-in mechanism for two agent clusters to exchange any information, so they can be rega...
[ -0.8193328976631165, -0.4103386104106903, -1.3904826641082764, 0.43158042430877686, -0.2635502517223358, -0.8368594646453857, 0.1925986111164093, 1.0654103755950928, 0.9542850255966187, -0.22998552024364471, -0.2842271327972412, -0.7911147475242615, -0.7775198817253113, 0.901330292224884, ...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Agent clusters and memory sharing - Cross-agent communication and memory model: As aforementioned, agents communicate via memory sharing. On the web, memory is shared via the `postMessage()` method. The using web workers guide provides an overview of this. Typically, data is passed by va...
[ -0.5683774352073669, -0.29355356097221375, -0.5379242300987244, -0.10894659906625748, 0.36477646231651306, -1.0113590955734253, 0.7498389482498169, 1.237626075744629, -0.02621554583311081, -0.4148552417755127, -0.4617297351360321, 0.004906748421490192, -0.1044301763176918, 0.53178155422210...
javascript/reference/execution_model/index.md
JavaScript - Execution model - Agent clusters and memory sharing - Concurrency and ensuring forward progress: When multiple agents cooperate, the never-blocking guarantee does not always hold. An agent can become blocked, or paused, while waiting for another agent to perform some action. This is different from waiting...
[ 0.5422687530517578, 0.4463970363140106, -0.1354689598083496, 0.545312762260437, 0.20510941743850708, -0.6219980716705322, 0.44893741607666016, 1.3097604513168335, -0.11933722347021103, 0.31374502182006836, -0.20054596662521362, -0.07106085121631622, -0.42949920892715454, 0.729396641254425,...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode: Note: Sometimes you'll see the default, non-strict mode referred to as sloppy mode. This isn't an official term, but be aware of it, just in case. JavaScript's strict mode is a way to opt in to a restricted variant of JavaScript, thereby implicitly opting-out of "sloppy mode". Strict mode is...
[ -1.4694938659667969, -0.6915438771247864, -0.5796480178833008, 0.12901681661605835, -0.08647064864635468, -1.1862099170684814, 0.9264562726020813, 0.5415133833885193, 0.5476365089416504, -0.08618184924125671, -0.9828037619590759, -0.13664878904819489, -0.8632557392120361, -0.40026563405990...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Invoking strict mode: Strict mode applies to entire scripts or to individual functions. It doesn't apply to block statements enclosed in `{}` braces; attempting to apply it to such contexts does nothing. `eval` code, `Function` code, event handler attributes, strings passed to `setTimeout()`...
[ -0.40621262788772583, -0.07804231345653534, -0.9340290427207947, 1.4184668064117432, -0.6448259353637695, -1.5421708822250366, 0.9149314761161804, 0.4706495702266693, -0.09636026620864868, -0.215542271733284, -0.9831194281578064, -0.13851676881313324, -0.009464246220886707, 0.2382100969552...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Invoking strict mode - Strict mode for scripts: To invoke strict mode for an entire script, put the exact statement `"use strict";` (or `'use strict';`) before any other statements. Example: // Whole-script strict mode syntax "use strict"; const v = "Hi! I'm a strict mode script!";
[ -0.2977418899536133, -0.2648577094078064, -0.8733752965927124, 1.1146020889282227, -0.4633382558822632, -1.545214056968689, 0.338154673576355, 0.7030798196792603, 0.5232928991317749, -0.11765164881944656, -1.0582282543182373, -0.060639072209596634, -0.30065542459487915, -0.3004219532012939...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Invoking strict mode - Strict mode for functions: Likewise, to invoke strict mode for a function, put the exact statement `"use strict";` (or `'use strict';`) in the function's body before any other statements. Example: function myStrictFunction() { // Function-level strict mode syntax ...
[ -0.04559141770005226, -0.08021587133407593, -1.2071841955184937, 0.3543027341365814, -0.35753196477890015, -1.7846176624298096, 0.1497322916984558, 0.5275172591209412, -0.004145395010709763, -0.07580864429473877, -0.8118435144424438, -0.2661990523338318, -0.10997330397367477, -0.3099079132...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Invoking strict mode - Strict mode for modules: The entire contents of JavaScript modules are automatically in strict mode, with no statement needed to initiate it. Example: function myStrictFunction() { // because this is a module, I'm strict by default } export default myStrictFunction...
[ -0.28872397541999817, -0.4974232017993927, -1.0522602796554565, 0.44805070757865906, -0.39357689023017883, -1.627367615699768, 0.7223553657531738, 0.7642252445220947, 0.3419222831726074, -0.3200123608112335, -1.400186538696289, -0.07981300354003906, -1.0503169298171997, 0.2701839208602905,...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Invoking strict mode - Strict mode for classes: All parts of a class's body are strict mode code, including both class declarations and class expressions. Example: class C1 { // All code here is evaluated in strict mode test() { delete Object.prototype; } } new C1().test(); // Ty...
[ -0.4327538013458252, -0.3237951695919037, -0.49222174286842346, 0.2821142077445984, -0.049951255321502686, -1.6046161651611328, 0.15263670682907104, 0.8883504867553711, 0.5946559906005859, -0.3241496980190277, -1.149545669555664, -0.6979457139968872, -0.223377525806427, -0.0372122935950756...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode: Strict mode changes both syntax and runtime behavior. Changes generally fall into these categories: - changes converting mistakes into errors (as syntax errors or at runtime) - changes simplifying how variable references are resolved - changes simplifying `eval` and ...
[ -1.0202209949493408, -0.6749208569526672, -0.3516627252101898, 0.5129557251930237, -0.4572841227054596, -1.3404788970947266, 0.9876847267150879, 1.0822832584381104, 0.8611502647399902, -0.14794307947158813, -0.9745736122131348, -0.7460789680480957, -0.5464419722557068, -0.24644367396831512...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors: Strict mode changes some previously-accepted mistakes into errors. JavaScript was designed to be easy for novice developers, and sometimes it gives operations which should be errors non-error semantics. Sometimes this fixes the immedi...
[ -0.40773987770080566, -0.8472447991371155, -1.2639470100402832, 0.6800627708435059, -0.3283860981464386, -0.9744282364845276, 1.1399527788162231, 1.0610867738723755, 0.3037745952606201, 0.14892776310443878, -1.54710054397583, -0.7781050801277161, -0.6408424377441406, 0.1117161437869072, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors - Assigning to undeclared variables: Strict mode makes it impossible to accidentally create global variables. In sloppy mode, mistyping a variable in an assignment creates a new property on the global object and continues to "work". As...
[ -1.2147141695022583, -0.28760841488838196, -0.7578935027122498, 0.825911819934845, -0.41026240587234497, -0.6565192341804504, 0.9773067831993103, 0.49061980843544006, 0.4215921461582184, -0.7102373838424683, -1.190527319908142, -0.7339925765991211, 0.25915729999542236, 0.022383514791727066...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors - Failing to assign to object properties: In strict mode, certain assignments throw errors instead of failing silently. There are three ways to fail a property assignment: - assignment to a non-writable data property - assignment to a...
[ -0.5973079800605774, -0.5643820762634277, -0.4254499673843384, 0.9227150082588196, 0.508862316608429, -0.8133013248443604, 1.1035034656524658, 0.7468367218971252, -0.28876230120658875, 0.26722532510757446, -0.7505520582199097, -0.3826252818107605, -0.49028289318084717, 0.3466988205909729, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors - Failing to delete object properties: Attempts to delete a non-configurable or otherwise undeletable (e.g., it's intercepted by a proxy's `deleteProperty` handler which returns `false`) property throw in strict mode (where before the ...
[ -0.9668100476264954, -0.17626605927944183, -0.4605407416820526, 0.37553372979164124, -0.6622180342674255, -1.1925266981124878, 1.2031490802764893, 0.36289456486701965, 0.16389591991901398, -0.3836672008037567, -1.465915560722351, -0.6793587803840637, -0.6346410512924194, -0.219694614410400...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors - Duplicate parameter names: Strict mode requires that function parameter names be unique. In sloppy mode, the last duplicated argument hides previous identically-named arguments. Those previous arguments remain available through `argu...
[ -1.045961618423462, -0.4909530580043793, -1.1381088495254517, 0.48522377014160156, -0.3986813426017761, -1.508123517036438, 1.3214854001998901, -0.12638632953166962, -0.3214723765850067, -0.6645451784133911, -1.4223235845565796, -0.5160293579101562, 0.023286255076527596, -0.668838381767273...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors - Legacy octal literals: Strict mode forbids a `0`-prefixed octal literal. In sloppy mode, a number beginning with a `0`, such as `0644`, is interpreted as an octal number (`0644 === 420`), if all digits are smaller than 8. Novice deve...
[ -0.3999943435192108, -0.043112218379974365, -1.3228774070739746, 0.3202093243598938, 0.8553323149681091, -1.6134963035583496, 0.629243791103363, 0.8388066291809082, 0.04122086241841316, 0.18195855617523193, -1.421382188796997, -0.05472486466169357, -0.42269062995910645, -0.1405270099639892...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors - Setting properties on primitive values: Strict mode forbids setting properties on primitive values. Accessing a property on a primitive implicitly creates a wrapper object that's unobservable, so in sloppy mode, setting properties is...
[ -1.1465953588485718, -0.3656594753265381, -1.212454080581665, 0.4099466800689697, -0.6430002450942993, -0.6975392699241638, 2.0221927165985107, 1.0353724956512451, 0.7024317979812622, -0.5830467343330383, -1.3962303400039673, -0.7329294085502625, 0.1746392697095871, -0.8447439670562744, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Converting mistakes into errors - Duplicate property names: Duplicate property names used to be considered a `SyntaxError` in strict mode. With the introduction of computed property names, making duplication possible at runtime, this restriction was removed in ES2015...
[ -0.6448642611503601, -0.6166238784790039, -0.5923231244087219, 1.1193498373031616, 0.0497971810400486, -1.8442755937576294, 1.6500132083892822, 1.154104471206665, 0.5352035760879517, -0.0752662867307663, -0.9142305254936218, 0.035098277032375336, -0.8742110729217529, -0.2577725946903229, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Simplifying scope management: Strict mode simplifies how variable names map to particular variable definitions in the code. Many compiler optimizations rely on the ability to say that variable X is stored in that location: this is critical to fully optimizing JavaScr...
[ -1.1366645097732544, -1.119139552116394, -1.274873971939087, 0.5094846487045288, -0.2990361750125885, -1.0136271715164185, 0.9902786612510681, 0.07529562711715698, 0.745094895362854, 0.008831015788018703, -1.379671573638916, -0.9389002323150635, -0.43009328842163086, -0.1036357656121254, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Simplifying scope management - Removal of the with statement: Strict mode prohibits `with`. The problem with `with` is that any name inside the block might map either to a property of the object passed to it, or to a variable in surrounding (or even global) scope, at...
[ -0.7316863536834717, -0.24313852190971375, -0.7017860412597656, 0.5204116702079773, -0.5723189115524292, -1.1147922277450562, -0.05338649824261665, -0.0183809045702219, 0.8605501651763916, -0.12229306250810623, -0.9499151706695557, -0.6392146348953247, -0.20782196521759033, -0.173293560743...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Simplifying scope management - Non-leaking eval: In strict mode, `eval` does not introduce new variables into the surrounding scope. In sloppy mode, `eval("var x;")` introduces a variable `x` into the surrounding function or the global scope. This means that, in gene...
[ -1.1096398830413818, -0.44288647174835205, -0.6057747006416321, 0.3860098421573639, -0.2987421154975891, -0.5972153544425964, 0.9367685914039612, 0.2517440915107727, 0.36803850531578064, -0.3940560221672058, -0.2277223765850067, -0.10051827132701874, -0.3805394470691681, -0.094936013221740...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Simplifying scope management - Block-scoped function declarations: The JavaScript language specification, since its start, had not allowed function declarations nested in block statements. However, it was so intuitive that most browsers implemented it as an extension...
[ -0.8053171038627625, -0.9492254257202148, -0.6690906882286072, 0.18226505815982819, -0.1409771889448166, -0.36988162994384766, 0.9554332494735718, 0.5594431161880493, 0.2919621765613556, -0.43742552399635315, -0.14981411397457123, -0.8876991868019104, -0.3724413216114044, -0.42047333717346...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Making eval and arguments simpler: Strict mode makes `arguments` and `eval` less bizarrely magical. Both involve a considerable amount of magical behavior in sloppy mode: `eval` to add or remove bindings and to change binding values, and `arguments` syncing named arg...
[ -0.9227261543273926, -0.8420272469520569, 0.21114706993103027, 0.1765175461769104, -0.5447409152984619, -1.171063780784607, 1.5912814140319824, 0.685397207736969, 0.5433419346809387, -0.23733548820018768, -1.3361369371414185, -0.5820510983467102, -0.46946075558662415, -0.3236766457557678, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Making eval and arguments simpler - Preventing binding or assigning eval and arguments: The names `eval` and `arguments` can't be bound or assigned in language syntax. All these attempts to do so are syntax errors: Example: "use strict"; eval = 17; arguments++; ++e...
[ 0.29509592056274414, -0.20269040763378143, -0.07864700257778168, 0.21468715369701385, -0.3886280357837677, -0.6637244820594788, 0.3944143056869507, 0.955888032913208, 0.22296060621738434, -0.5081469416618347, -0.6260603070259094, -0.13942141830921173, -0.8804411292076111, 0.180372342467308...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Making eval and arguments simpler - No syncing between parameters and arguments indices: Strict mode code doesn't sync indices of the `arguments` object with each parameter binding. In a sloppy mode function whose first argument is `arg`, setting `arg` also sets `arg...
[ -0.6405134797096252, -0.8264085054397583, -0.7937009930610657, 0.15669278800487518, -0.2680343985557556, -1.6541727781295776, 1.2119380235671997, 0.3298392593860626, 0.7764797210693359, -0.6551189422607422, -1.1411486864089966, -0.5459045767784119, -0.24940942227840424, -0.258990615606308,...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - "Securing" JavaScript: Strict mode makes it easier to write "secure" JavaScript. Some websites now provide ways for users to write JavaScript which will be run by the website on behalf of other users. JavaScript in browsers can access the user's private information, ...
[ -0.1307142823934555, -0.019175179302692413, -0.9749534130096436, 0.40268489718437195, -0.36706843972206116, -0.8706515431404114, 0.9521365165710449, 0.567379891872406, 0.31752434372901917, 0.05258965492248535, -1.13856041431427, -0.6612743735313416, -1.2254456281661987, -0.611626386642456,...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - "Securing" JavaScript - No this substitution: The value passed as `this` to a function in strict mode is not forced into being an object (a.k.a. "boxed"). For a sloppy mode function, `this` is always an object: either the provided object, if called with an object-val...
[ -1.123755693435669, -0.5735430717468262, -1.0441863536834717, 0.5577890276908875, -0.15239760279655457, -1.3383331298828125, 1.3666555881500244, 0.7796925902366638, 0.4007338285446167, -0.46200862526893616, -0.6866820454597473, -0.9946514368057251, -0.2122039645910263, -0.2424757033586502,...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - "Securing" JavaScript - Removal of stack-walking properties: In strict mode it's no longer possible to "walk" the JavaScript stack. Many implementations used to implement some extension features that make it possible to detect the upstream caller of a function. When ...
[ 0.8819120526313782, -0.8189586997032166, -1.4709197282791138, 0.712809145450592, 0.5492356419563293, -1.4396156072616577, -0.1700924187898636, 0.744469165802002, -0.10201840847730637, 0.08906740695238113, 0.055263932794332504, 0.30967164039611816, -0.03108467534184456, 0.24409905076026917,...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Changes in strict mode - Future-proofing JavaScript - Extra reserved words: Reserved words are identifiers that can't be used as variable names. Strict mode reserves some more names than sloppy mode, some of which are already used in the language, and some of which are reserved for the futur...
[ -0.6711258292198181, -0.40500739216804504, -0.6441807150840759, 1.195847749710083, -0.6127490401268005, -1.4343403577804565, 1.335620403289795, 0.7269071340560913, 0.6734709739685059, -0.44592851400375366, -1.2665488719940186, 0.0374906025826931, -1.5110230445861816, -0.24034231901168823, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Transitioning to strict mode: Strict mode has been designed so that the transition to it can be made gradually. It is possible to change each file individually and even to transition code to strict mode down to the function granularity. You can migrate a codebase to strict mode by first add...
[ -0.42804840207099915, -0.2054697722196579, -0.8641690015792847, 0.6940006017684937, -0.2565508484840393, -1.114208459854126, 0.40290898084640503, 0.5834119915962219, 0.5680417418479919, 0.16406026482582092, -1.0206602811813354, -0.6616677641868591, -0.6333959698677063, 0.6684205532073975, ...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Transitioning to strict mode - Syntax errors: When adding `'use strict';`, the following cases will throw a `SyntaxError` before the script is executing: - Octal syntax `const n = 023;` - `with` statement - Using `delete` on a variable name `delete myVariable`; - Using `eval` or `arguments`...
[ -0.9084548950195312, -0.032916899770498276, -0.7311632633209229, 0.6065793037414551, -0.4663139283657074, -1.3324493169784546, 0.4910774230957031, 1.316688895225525, -0.36831367015838623, 0.2945582866668701, -0.94941645860672, -0.38867488503456116, -0.38541164994239807, -0.4863481521606445...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Transitioning to strict mode - New runtime errors: JavaScript used to silently fail in contexts where what was done should be an error. Strict mode throws in such cases. If your code base contains such cases, testing will be necessary to be sure nothing is broken. You can screen for such err...
[ -0.9099311232566833, -0.1025165244936943, -0.9155842661857605, 1.4938490390777588, -0.16599099338054657, -0.6168851256370544, 1.0802463293075562, 0.36589595675468445, -0.1468605101108551, 0.051382146775722504, -0.834942102432251, -0.9233257174491882, -0.43893763422966003, 0.058858018368482...
javascript/reference/strict_mode/index.md
JavaScript - Strict mode - Transitioning to strict mode - Semantic differences: These differences are very subtle differences. It's possible that a test suite doesn't catch this kind of subtle difference. Careful review of your code base will probably be necessary to be sure these differences don't affect the semantic...
[ -0.31993284821510315, -0.2509525418281555, -0.3726201355457306, 0.24854080379009247, 0.45542821288108826, -0.9652597904205322, -0.11510760337114334, 0.3992696702480316, -0.13938108086585999, -0.26757070422172546, -0.22594565153121948, -0.49729806184768677, -0.45716238021850586, 0.129301980...
javascript/reference/global_objects/int8array/index.md
JavaScript - Global Objects - Int8Array: The `Int8Array` typed array represents an array of 8-bit signed integers. The contents are initialized to `0` unless initialization data is explicitly provided. Once established, you can reference elements in the array using the object's methods, or using standard array index s...
[ -0.8545945286750793, -0.562656819820404, -0.8064008951187134, 0.6807438135147095, 0.1291046291589737, -1.2093567848205566, 0.3469102382659912, 1.0715250968933105, 0.010284786112606525, 0.13831830024719238, -0.30488690733909607, 0.1326761692762375, 0.18454770743846893, -0.2378765344619751, ...
javascript/reference/global_objects/int8array/index.md
JavaScript - Global Objects - Int8Array - Constructor: - `Int8Array()`: Creates a new `Int8Array` object.
[ -0.7037020921707153, -0.10802003741264343, -0.9879957437515259, 0.7050273418426514, -0.23254722356796265, -1.4534904956817627, -0.9283223748207092, 0.6987189650535583, -0.15150266885757446, 0.10800492018461227, -0.49935996532440186, -0.29902100563049316, 0.11487779021263123, -0.20212213695...
javascript/reference/global_objects/int8array/index.md
JavaScript - Global Objects - Int8Array - Static properties: Also inherits static properties from its parent `TypedArray`. - `Int8Array.BYTES_PER_ELEMENT`: Returns a number value of the element size. `1` in the case of `Int8Array`.
[ -0.6687194108963013, 0.29647326469421387, -1.0781100988388062, 0.201390340924263, -0.03824888914823532, -1.891708254814148, 0.35058021545410156, 0.9393313527107239, -0.4007510244846344, -0.003933288156986237, -0.6592404246330261, 0.42521777749061584, -0.5502080917358398, -0.197370275855064...
javascript/reference/global_objects/int8array/index.md
JavaScript - Global Objects - Int8Array - Static methods: Inherits static methods from its parent `TypedArray`.
[ -0.2977020740509033, 0.00882554892450571, -1.0410993099212646, -0.07402976602315903, -0.06458643078804016, -1.5188207626342773, 0.36036133766174316, 1.6425950527191162, -0.6806109547615051, 0.07241078466176987, -0.8117689490318298, -0.5101872682571411, -0.4424099028110504, -0.2095412462949...
javascript/reference/global_objects/int8array/index.md
JavaScript - Global Objects - Int8Array - Instance properties: Also inherits instance properties from its parent `TypedArray`. These properties are defined on `Int8Array.prototype` and shared by all `Int8Array` instances. - `Int8Array.prototype.BYTES_PER_ELEMENT`: Returns a number value of the element size. `1` in t...
[ -0.022980840876698494, -0.1382811814546585, -0.8860027194023132, 0.3466220498085022, 0.15283018350601196, -1.6429171562194824, -0.15076273679733276, 0.7844313979148865, 0.1348343938589096, 0.11724603921175003, -0.7340810894966125, 0.5389867424964905, -0.7374467253684998, 0.2366147488355636...
javascript/reference/global_objects/int8array/index.md
JavaScript - Global Objects - Int8Array - Instance methods: Inherits instance methods from its parent `TypedArray`.
[ 0.1656135618686676, -0.26635676622390747, -0.6836671233177185, 0.1003165915608406, -0.4079171121120453, -1.3018226623535156, 0.2973562479019165, 1.051061749458313, -0.6976829171180725, -0.36405935883522034, -0.6208639740943909, -0.20457981526851654, -0.3784085810184479, 0.22567787766456604...
javascript/reference/global_objects/int8array/index.md
JavaScript - Global Objects - Int8Array - Examples - Different ways to create an Int8Array: Example: // From a length const int8 = new Int8Array(2); int8[0] = 42; console.log(int8[0]); // 42 console.log(int8.length); // 2 console.log(int8.BYTES_PER_ELEMENT); // 1 // From an array const x = new Int8Array([21, 31]); c...
[ 0.13689814507961273, 0.13208256661891937, -0.7382673025131226, 0.4272986948490143, 0.37897929549217224, -1.1011426448822021, -1.300557017326355, 0.31751060485839844, 0.11947329342365265, 0.2166050672531128, 0.3631698787212372, 0.0578024722635746, -0.4761064648628235, -0.2598681151866913, ...
javascript/reference/global_objects/int8array/int8array/index.md
JavaScript - Global Objects - Int8Array: The `Int8Array()` constructor creates `Int8Array` objects. The contents are initialized to `0` unless initialization data is explicitly provided.
[ -0.2455277144908905, -0.05480816587805748, -0.6630972027778625, 0.9875633716583252, -0.31367990374565125, -1.7108585834503174, -0.411395400762558, 0.5283222794532776, -0.4532235264778137, 0.28314685821533203, -0.4970933794975281, -0.5302459597587585, -0.10010389238595963, -0.45676687359809...
javascript/reference/global_objects/int8array/int8array/index.md
JavaScript - Global Objects - Int8Array - Syntax: Example: new Int8Array() new Int8Array(length) new Int8Array(typedArray) new Int8Array(object) new Int8Array(buffer) new Int8Array(buffer, byteOffset) new Int8Array(buffer, byteOffset, length) Note: `Int8Array()` can only be constructed with `new`. Attempting to cal...
[ 0.13010863959789276, 0.14595912396907806, -0.5969377160072327, -0.18861138820648193, 0.5416406393051147, -0.7436508536338806, -0.6988568305969238, 0.5534759759902954, -0.1399882733821869, -0.11705558747053146, -0.43980643153190613, -0.256830632686615, 0.3336952030658722, 0.6433205008506775...
javascript/reference/global_objects/int8array/int8array/index.md
JavaScript - Global Objects - Int8Array - Syntax - Parameters: See `TypedArray`.
[ 0.46242162585258484, -0.15092603862285614, -0.8767620921134949, 0.012922507710754871, -0.4110589623451233, -1.1935971975326538, -0.029540056362748146, 0.9514416456222534, -0.266500860452652, 0.2860262989997864, -0.3632071018218994, -0.03811018541455269, 0.41690683364868164, 0.1926521807909...
javascript/reference/global_objects/int8array/int8array/index.md
JavaScript - Global Objects - Int8Array - Syntax - Exceptions: See `TypedArray`.
[ 0.09268156439065933, -0.49786853790283203, -0.6198399662971497, 0.2973514795303345, -0.5377503037452698, -1.569445252418518, -0.4077526330947876, 1.060416579246521, -0.5308143496513367, 0.09788433462381363, -0.04824797064065933, -0.45225489139556885, 0.09178339689970016, 0.1933172196149826...
javascript/reference/global_objects/int8array/int8array/index.md
JavaScript - Global Objects - Int8Array - Examples - Different ways to create an Int8Array: Example: // From a length const int8 = new Int8Array(2); int8[0] = 42; console.log(int8[0]); // 42 console.log(int8.length); // 2 console.log(int8.BYTES_PER_ELEMENT); // 1 // From an array const x = new Int8Array([21, 31]); c...
[ 0.13689814507961273, 0.13208256661891937, -0.7382673025131226, 0.4272986948490143, 0.37897929549217224, -1.1011426448822021, -1.300557017326355, 0.31751060485839844, 0.11947329342365265, 0.2166050672531128, 0.3631698787212372, 0.0578024722635746, -0.4761064648628235, -0.2598681151866913, ...
javascript/reference/global_objects/int16array/index.md
JavaScript - Global Objects - Int16Array: The `Int16Array` typed array represents an array of 16-bit signed integers 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 established, you can...
[ -0.002110023982822895, -0.38729798793792725, -0.7472624182701111, 0.6600733399391174, 0.5783788561820984, -0.6423243880271912, 0.9612326622009277, 1.169616937637329, 0.1484423279762268, 0.3890671133995056, 0.07540704309940338, 0.4139779210090637, 0.2522834241390228, -0.04462627321481705, ...
javascript/reference/global_objects/int16array/index.md
JavaScript - Global Objects - Int16Array - Constructor: - `Int16Array()`: Creates a new `Int16Array` object.
[ -0.3371554911136627, 0.12322086095809937, -0.7680472135543823, 0.5009539723396301, -0.11515133827924728, -0.9645073413848877, -0.42304420471191406, 0.9430291652679443, 0.2582750618457794, -0.16860134899616241, -0.06859534233808517, 0.22400414943695068, -0.14685018360614777, -0.223328396677...
javascript/reference/global_objects/int16array/index.md
JavaScript - Global Objects - Int16Array - Static properties: Also inherits static properties from its parent `TypedArray`. - `Int16Array.BYTES_PER_ELEMENT`: Returns a number value of the element size. `2` in the case of `Int16Array`.
[ -0.54751056432724, 0.3350614905357361, -0.899240255355835, 0.1627226024866104, -0.0802098736166954, -1.5218032598495483, 0.6029909253120422, 1.0369811058044434, -0.07477885484695435, -0.1645340919494629, -0.2944856882095337, 0.9828903079032898, -0.659858763217926, -0.16765275597572327, 0...
javascript/reference/global_objects/int16array/index.md
JavaScript - Global Objects - Int16Array - Static methods: Inherits static methods from its parent `TypedArray`.
[ -0.05208633840084076, 0.2081223577260971, -0.9775508642196655, -0.22038522362709045, 0.045042734593153, -1.2962287664413452, 0.6933640837669373, 1.6703616380691528, -0.31813064217567444, -0.20295606553554535, -0.5100906491279602, -0.15680015087127686, -0.6522180438041687, -0.25334057211875...
javascript/reference/global_objects/int16array/index.md
JavaScript - Global Objects - Int16Array - Instance properties: Also inherits instance properties from its parent `TypedArray`. These properties are defined on `Int16Array.prototype` and shared by all `Int16Array` instances. - `Int16Array.prototype.BYTES_PER_ELEMENT`: Returns a number value of the element size. `2` ...
[ 0.11043203622102737, -0.1319008767604828, -0.8104659914970398, 0.26235446333885193, 0.12504509091377258, -1.2975174188613892, 0.19829651713371277, 1.0099496841430664, 0.4125295579433441, -0.06780357658863068, -0.4425908327102661, 0.9695881009101868, -1.002113938331604, 0.3031684160232544, ...
javascript/reference/global_objects/int16array/index.md
JavaScript - Global Objects - Int16Array - Instance methods: Inherits instance methods from its parent `TypedArray`.
[ 0.38511922955513, -0.08304036408662796, -0.6152371168136597, -0.0743529200553894, -0.28256192803382874, -1.093164324760437, 0.6722496151924133, 1.0952999591827393, -0.3600344657897949, -0.63693767786026, -0.3195915222167969, 0.12838147580623627, -0.6040688753128052, 0.15037785470485687, ...
javascript/reference/global_objects/int16array/index.md
JavaScript - Global Objects - Int16Array - Examples - Different ways to create an Int16Array: Example: // From a length const int16 = new Int16Array(2); int16[0] = 42; console.log(int16[0]); // 42 console.log(int16.length); // 2 console.log(int16.BYTES_PER_ELEMENT); // 2 // From an array const x = new Int16Array([21...
[ 0.5354422926902771, 0.19920668005943298, -0.7362605333328247, 0.48194438219070435, 0.5427689552307129, -0.6143544316291809, -1.0317751169204712, 0.527042806148529, 0.484285831451416, 0.05315623804926872, 0.6386328339576721, 0.5415716171264648, -0.6364061832427979, -0.25356215238571167, -...
javascript/reference/global_objects/int16array/int16array/index.md
JavaScript - Global Objects - Int16Array: The `Int16Array()` constructor creates `Int16Array` objects. The contents are initialized to `0` unless initialization data is explicitly provided.
[ 0.06178193539381027, 0.16519847512245178, -0.3752440810203552, 0.7928208112716675, -0.19279056787490845, -1.154528021812439, 0.03551372140645981, 0.8080132603645325, -0.03942546993494034, -0.014055256731808186, -0.15358203649520874, -0.042482148855924606, -0.4332342743873596, -0.5414639711...
javascript/reference/global_objects/int16array/int16array/index.md
JavaScript - Global Objects - Int16Array - Syntax: Example: new Int16Array() new Int16Array(length) new Int16Array(typedArray) new Int16Array(object) new Int16Array(buffer) new Int16Array(buffer, byteOffset) new Int16Array(buffer, byteOffset, length) Note: `Int16Array()` can only be constructed with `new`. Attempti...
[ -0.1547347605228424, 0.19850464165210724, -0.8167403936386108, -0.22709330916404724, 0.31153154373168945, -1.2755193710327148, -0.5935423970222473, 1.1393884420394897, 0.41622984409332275, -0.09740227460861206, 0.4353034198284149, 0.4900079369544983, -0.08351854234933853, 0.158237114548683...
javascript/reference/global_objects/int16array/int16array/index.md
JavaScript - Global Objects - Int16Array - Syntax - Parameters: See `TypedArray`.
[ 0.5997347235679626, 0.032228343188762665, -0.7726374268531799, -0.10527679324150085, -0.2737753391265869, -0.8507959246635437, 0.3546929359436035, 1.0261038541793823, 0.11879178136587143, -0.029748111963272095, -0.05138252303004265, 0.46384021639823914, 0.23534493148326874, 0.0996741205453...
javascript/reference/global_objects/int16array/int16array/index.md
JavaScript - Global Objects - Int16Array - Syntax - Exceptions: See `TypedArray`.
[ 0.1991722285747528, -0.2861192226409912, -0.5006540417671204, 0.16595861315727234, -0.38733208179473877, -1.2242603302001953, -0.024154281243681908, 1.1754335165023804, -0.13058418035507202, -0.1878204345703125, 0.24883073568344116, 0.14828944206237793, -0.09778956323862076, 0.057498715817...
javascript/reference/global_objects/int16array/int16array/index.md
JavaScript - Global Objects - Int16Array - Examples - Different ways to create an Int16Array: Example: // From a length const int16 = new Int16Array(2); int16[0] = 42; console.log(int16[0]); // 42 console.log(int16.length); // 2 console.log(int16.BYTES_PER_ELEMENT); // 2 // From an array const x = new Int16Array([21...
[ 0.5354422926902771, 0.19920668005943298, -0.7362605333328247, 0.48194438219070435, 0.5427689552307129, -0.6143544316291809, -1.0317751169204712, 0.527042806148529, 0.484285831451416, 0.05315623804926872, 0.6386328339576721, 0.5415716171264648, -0.6364061832427979, -0.25356215238571167, -...
javascript/reference/global_objects/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError: The `SyntaxError` object represents an error when trying to interpret syntactically invalid code. It is thrown when the JavaScript engine encounters tokens or token order that does not conform to the syntax of the language when parsing code. `SyntaxError` is a `serializable ...
[ -0.4770109951496124, -0.21365173161029816, -0.22957052290439606, 0.5779122114181519, 0.18096785247325897, -1.5343812704086304, -0.36567923426628113, 0.9773380160331726, -0.262796014547348, -0.3496742248535156, -0.18376383185386658, -0.14409105479717255, -0.4063063859939575, 0.3850812315940...
javascript/reference/global_objects/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Constructor: - `SyntaxError()`: Creates a new `SyntaxError` object.
[ -0.6200513243675232, 0.07339002192020416, -0.3819262385368347, 0.27744507789611816, -0.1482641100883484, -1.9871323108673096, -0.49653950333595276, 1.5789718627929688, -0.40775129199028015, -0.7316747903823853, -0.2755853235721588, -0.2985205054283142, 0.012884208932518959, 0.0999398082494...
javascript/reference/global_objects/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Instance properties: Also inherits instance properties from its parent `Error`. These properties are defined on `SyntaxError.prototype` and shared by all `SyntaxError` instances. - `SyntaxError.prototype.constructor`: The constructor function that created the instance obje...
[ -0.33452293276786804, -0.3323555588722229, -0.4809248149394989, 0.7311111092567444, -0.07668022811412811, -2.020627021789551, 0.3714732229709625, 1.4525455236434937, 0.28945666551589966, -0.32767200469970703, -0.6417601704597473, 0.15206927061080933, -0.9841327667236328, 0.5067442059516907...
javascript/reference/global_objects/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Instance methods: Inherits instance methods from its parent `Error`.
[ -0.08980891853570938, -0.3117230236530304, -0.5143362283706665, -0.1161971315741539, -0.3313369154930115, -2.047828435897827, 0.8965245485305786, 1.2531594038009644, -0.5957019925117493, -1.1526471376419067, -0.5893775224685669, -0.12321940809488297, -0.6172513961791992, 0.6334483027458191...
javascript/reference/global_objects/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Examples - Catching a SyntaxError: Example: try { eval("hoo bar"); } catch (e) { console.log(e instanceof SyntaxError); // true console.log(e.message); console.log(e.name); // "SyntaxError" console.log(e.stack); // Stack of the error }
[ 0.2350415140390396, -0.3434221148490906, -0.6730420589447021, 0.9400006532669067, 0.07105527818202972, -2.0280327796936035, 0.14522525668144226, 1.073805332183838, -0.5935795903205872, -0.5113148093223572, 0.04685276746749878, -0.31324344873428345, 0.214056596159935, 0.08319398760795593, ...
javascript/reference/global_objects/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Examples - Creating a SyntaxError: Example: try { throw new SyntaxError("Hello"); } catch (e) { console.log(e instanceof SyntaxError); // true console.log(e.message); // "Hello" console.log(e.name); // "SyntaxError" console.log(e.stack); // Stack of the error }
[ 0.05815848335623741, -0.11258148401975632, -0.36204978823661804, 1.2198957204818726, 0.21911057829856873, -1.7686868906021118, -0.5110808610916138, 0.7702458500862122, -0.2527622580528259, -0.6682161688804626, -0.1588287651538849, 0.05616476759314537, 0.5184053182601929, -0.205704227089881...
javascript/reference/global_objects/syntaxerror/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError: The `SyntaxError()` constructor creates `SyntaxError` objects.
[ -0.3828960955142975, 0.1791306436061859, -0.39815694093704224, 0.41547393798828125, -0.3789628744125366, -2.120840072631836, -0.5841888785362244, 1.2938506603240967, -0.5169560313224792, -0.5939793586730957, -0.26924940943717957, -0.21503855288028717, -0.35082072019577026, -0.1300565749406...
javascript/reference/global_objects/syntaxerror/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Syntax: Example: new SyntaxError() new SyntaxError(message) new SyntaxError(message, options) new SyntaxError(message, fileName) new SyntaxError(message, fileName, lineNumber) SyntaxError() SyntaxError(message) SyntaxError(message, options) SyntaxError(message, fileName) S...
[ -0.3291510343551636, -0.482144832611084, -0.651495099067688, -0.03776871785521507, -0.11292197555303574, -2.3776590824127197, -0.6104345917701721, 1.1969059705734253, -0.2168053239583969, -0.6912144422531128, -0.06833825260400772, -0.3345176577568054, 0.32435786724090576, 0.406347453594207...
javascript/reference/global_objects/syntaxerror/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Syntax - Parameters: - `message` (optional): Human-readable description of the error - `options` (optional): An object that has the following properties: - `cause` (optional): A property indicating the specific cause of the error. When catching and re-throwing an error wit...
[ -0.3079621493816376, -0.7942408919334412, -0.8161683082580566, -0.3762839436531067, 0.2738654315471649, -2.035223960876465, 0.36103397607803345, 0.6610430479049683, 0.10054515302181244, -0.4340336322784424, -1.0300335884094238, 0.02609744295477867, -0.06020421162247658, 0.8970232605934143,...
javascript/reference/global_objects/syntaxerror/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Examples - Catching a SyntaxError: Example: try { eval("hoo bar"); } catch (e) { console.log(e instanceof SyntaxError); // true console.log(e.message); console.log(e.name); // "SyntaxError" console.log(e.stack); // Stack of the error }
[ 0.2350415140390396, -0.3434221148490906, -0.6730420589447021, 0.9400006532669067, 0.07105527818202972, -2.0280327796936035, 0.14522525668144226, 1.073805332183838, -0.5935795903205872, -0.5113148093223572, 0.04685276746749878, -0.31324344873428345, 0.214056596159935, 0.08319398760795593, ...
javascript/reference/global_objects/syntaxerror/syntaxerror/index.md
JavaScript - Global Objects - SyntaxError - Examples - Creating a SyntaxError: Example: try { throw new SyntaxError("Hello"); } catch (e) { console.log(e instanceof SyntaxError); // true console.log(e.message); // "Hello" console.log(e.name); // "SyntaxError" console.log(e.stack); // Stack of the error }
[ 0.05815848335623741, -0.11258148401975632, -0.36204978823661804, 1.2198957204818726, 0.21911057829856873, -1.7686868906021118, -0.5110808610916138, 0.7702458500862122, -0.2527622580528259, -0.6682161688804626, -0.1588287651538849, 0.05616476759314537, 0.5184053182601929, -0.205704227089881...
javascript/reference/global_objects/bigint64array/index.md
JavaScript - Global Objects - BigInt64Array: The `BigInt64Array` typed array represents an array of 64-bit signed integers in the platform byte order. If control over byte order is needed, use `DataView` instead. The contents are initialized to `0n` unless initialization data is explicitly provided. Once established, ...
[ 0.012501097284257412, -0.4486820697784424, -1.5809320211410522, 0.26671305298805237, 0.5323603749275208, 0.06697458028793335, -0.6318573355674744, 0.5177952647209167, 0.36632734537124634, 0.1620289832353592, -0.4635108411312103, 0.42308491468429565, 0.08591517060995102, 0.2223672717809677,...
javascript/reference/global_objects/bigint64array/index.md
JavaScript - Global Objects - BigInt64Array - Constructor: - `BigInt64Array()`: Creates a new `BigInt64Array` object.
[ -0.4594009816646576, -0.08793307095766068, -0.9683284759521484, 0.6171569228172302, -0.057847753167152405, -0.7973777055740356, -1.1202600002288818, 0.636509358882904, 0.2508222162723541, -0.026569612324237823, -0.316019207239151, -0.44752442836761475, -0.044490158557891846, 0.208038404583...