file stringlengths 16 94 | text stringlengths 32 24.4k | vector list |
|---|---|---|
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement:
The JavaScript exception "function statement requires a name" occurs when there is a function statement in the code that requires a name. | [
-0.15594786405563354,
-0.12245155870914459,
-2.067251682281494,
0.04230041056871414,
-0.791954755783081,
-0.8404611945152283,
0.8673309087753296,
0.6805034279823303,
-1.4518405199050903,
-0.7782857418060303,
-0.08364656567573547,
-1.0433223247528076,
-0.7036741971969604,
-0.406650632619857... |
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement - Message:
Example:
SyntaxError: Function statements require a function name (V8-based)
SyntaxError: function statement requires a name (Firefox)
SyntaxError: Function statements must have a name. (Safari) | [
-0.42337852716445923,
0.03553358465433121,
-1.9695782661437988,
-0.5241509675979614,
-0.7658131122589111,
-1.0819514989852905,
1.1277694702148438,
1.0140382051467896,
-0.9542762637138367,
-0.5146045684814453,
0.2932841181755066,
-0.7599079012870789,
-0.6442660689353943,
-0.5792162418365479... |
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement - Error type:
`SyntaxError` | [
-0.3876487612724304,
0.6085386276245117,
-1.3138347864151,
-0.3263136148452759,
-0.6756764650344849,
-0.38747262954711914,
1.2912317514419556,
2.573695182800293,
-0.7143754363059998,
-0.7968716025352478,
0.40587368607521057,
0.025869958102703094,
-0.2420249730348587,
-0.3904348909854889,
... |
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement - What went wrong?:
There is a function statement in the code that requires a name. You'll need to check how functions are defined and if you need to provide a name for it, or if the function in question needs to be a function expression, an IIFE, or if the function cod... | [
-0.32076185941696167,
0.1286330372095108,
-1.9626294374465942,
-0.6079697608947754,
-0.15619654953479767,
-1.0621833801269531,
1.0726773738861084,
0.9825968742370605,
-1.3056175708770752,
0.43596506118774414,
-0.14038461446762085,
-1.2754050493240356,
-0.8453631401062012,
-0.29374334216117... |
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement - Examples - Statements vs. expressions:
A function statement (or function declaration) requires a name. This won't work:
Example:
function () {
return "Hello world";
}
// SyntaxError: function statement requires a name
You can use a function expression (assignment... | [
-0.2186608463525772,
0.06237281858921051,
-1.2528375387191772,
0.25826123356819153,
-0.16961698234081268,
-1.5312715768814087,
0.5557722449302673,
0.08993735909461975,
-0.4072536826133728,
-0.27459457516670227,
-0.18721166253089905,
-0.6491909027099609,
0.042454686015844345,
-0.50025391578... |
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement - Examples - Labeled functions:
Labels are an entirely different feature from function names. You can't use a label as a function name.
Example:
function Greeter() {
german: function () {
return "Moin";
}
}
// SyntaxError: function statement requires a name
I... | [
-1.7472747564315796,
0.25164687633514404,
-1.4404315948486328,
-0.4427509903907776,
-0.21787473559379578,
-1.7449012994766235,
0.5501934885978699,
0.7923628091812134,
-0.408148854970932,
-0.5306736826896667,
0.6493461728096008,
0.560660183429718,
-0.6409600973129272,
-0.195713073015213,
... |
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement - Examples - Object methods:
If you intended to create a method of an object, you will need to create an object. The following syntax without a name after the `function` keyword is valid then.
Example:
const greeter = {
german: function () {
return "Moin";
},
... | [
-0.570458710193634,
-0.1978006362915039,
-1.1747102737426758,
0.21409699320793152,
0.2698632776737213,
-1.3509151935577393,
0.9813726544380188,
0.4879189431667328,
-0.6632363796234131,
-0.5745254755020142,
0.0867704376578331,
0.3069647252559662,
-0.23750272393226624,
-0.6465405821800232,
... |
javascript/reference/errors/unnamed_function_statement/index.md | JavaScript - Errors - Unnamed function statement - Examples - Callback syntax:
Also, check your syntax when using callbacks. Braces and commas can quickly get confusing.
Example:
promise.then(
function () {
console.log("success");
});
function () {
console.log("error");
}
// SyntaxError: function state... | [
-0.28709325194358826,
0.9643022418022156,
-1.371368169784546,
-0.41258504986763,
-0.14668728411197662,
-1.265650987625122,
0.7957143187522888,
0.8305333852767944,
-1.3696410655975342,
-0.4237554669380188,
0.18066933751106262,
-0.11069270968437195,
-0.012346475385129452,
-0.3261218369007110... |
javascript/reference/errors/reserved_identifier/index.md | JavaScript - Errors - Reserved identifier:
The JavaScript exception "variable is a reserved identifier" occurs when reserved keywords are used as identifiers. | [
0.5621536374092102,
0.24228604137897491,
-1.1932640075683594,
0.7922785878181458,
-1.32581627368927,
-1.3092925548553467,
0.7720137238502502,
1.521270513534546,
-0.19338774681091309,
-0.657548189163208,
-0.7367249727249146,
-0.7012082934379578,
-0.7657907009124756,
-0.4047144055366516,
0... |
javascript/reference/errors/reserved_identifier/index.md | JavaScript - Errors - Reserved identifier - Message:
Example:
SyntaxError: Unexpected reserved word (V8-based)
SyntaxError: implements is a reserved identifier (Firefox)
SyntaxError: Cannot use the reserved word 'implements' as a variable name. (Safari) | [
-0.11468508094549179,
0.315415620803833,
-0.488417387008667,
0.6409583687782288,
-1.1413336992263794,
-2.1269333362579346,
1.4755361080169678,
0.9865872859954834,
0.044246844947338104,
-0.280692994594574,
0.06097248196601868,
-0.15172578394412994,
-1.0088906288146973,
-0.4057146906852722,
... |
javascript/reference/errors/reserved_identifier/index.md | JavaScript - Errors - Reserved identifier - Error type:
`SyntaxError` | [
-0.2535784840583801,
0.26364415884017944,
-0.37193936109542847,
0.3209095299243927,
-0.9302376508712769,
-0.6350277066230774,
1.0172364711761475,
2.369741439819336,
0.21844090521335602,
-0.9662865996360779,
0.3495064079761505,
0.08966995030641556,
-0.745087742805481,
0.1574428230524063,
... |
javascript/reference/errors/reserved_identifier/index.md | JavaScript - Errors - Reserved identifier - What went wrong?:
Reserved keywords will throw in if they are used as identifiers. These are reserved in strict mode and sloppy mode:
- `enum`
The following are only reserved when they are found in strict mode code:
- `implements`
- `interface`
- `let`
- `package`
- `priv... | [
-0.3346163332462311,
0.4264388680458069,
-0.6214903593063354,
0.2964833378791809,
-0.843498706817627,
-0.7131001949310303,
0.49385836720466614,
1.0847392082214355,
-0.3908351957798004,
-0.19667182862758636,
-0.7047609686851501,
-0.41462281346321106,
-0.6906728148460388,
-0.9599754810333252... |
javascript/reference/errors/reserved_identifier/index.md | JavaScript - Errors - Reserved identifier - Examples - Strict and non-strict reserved keywords:
The `enum` identifier is generally reserved.
Example:
const enum = { RED: 0, GREEN: 1, BLUE: 2 };
// SyntaxError: enum is a reserved identifier
In strict mode code, more identifiers are reserved.
Example:
"use strict";... | [
-0.7928305268287659,
-0.21395020186901093,
-0.5480043292045593,
0.06615106016397476,
-0.7288369536399841,
-1.6244127750396729,
0.26626160740852356,
1.685835361480713,
-0.12333458662033081,
0.031180743128061295,
-0.8378621935844421,
0.3518539369106293,
-0.671048104763031,
-0.287157177925109... |
javascript/reference/errors/reserved_identifier/index.md | JavaScript - Errors - Reserved identifier - Examples - Update older browsers:
If you are using an older browser that does not yet implement `let` or `class`, for example, you should update to a more recent browser version that does support these new language features.
Example:
"use strict";
class DocArchiver {}
// ... | [
-0.8820117115974426,
-0.2721136510372162,
-0.542728066444397,
0.19323205947875977,
-0.10504899173974991,
-0.9012073278427124,
0.5335019826889038,
1.4810171127319336,
0.1764613687992096,
-0.4660933017730713,
-0.30203473567962646,
-0.43232354521751404,
-1.4835437536239624,
-0.105119951069355... |
javascript/reference/errors/label_not_found/index.md | JavaScript - Errors - Label not found:
The JavaScript exception "label not found" occurs when a `break` or `continue` statement references a label that does not exist on any statement that contains the `break` or `continue` statement. | [
-1.5310769081115723,
0.46724849939346313,
-0.8737664222717285,
0.5030518770217896,
-0.6908071637153625,
-0.15718990564346313,
0.41325297951698303,
1.6278338432312012,
-0.5860283374786377,
-0.16442953050136566,
0.12346968799829483,
-1.0778696537017822,
-1.0276168584823608,
0.717256665229797... |
javascript/reference/errors/label_not_found/index.md | JavaScript - Errors - Label not found - Message:
Example:
SyntaxError: Undefined label 'label' (V8-based)
SyntaxError: label not found (Firefox)
SyntaxError: Cannot use the undeclared label 'label'. (Safari) | [
-1.180903434753418,
0.4506871700286865,
-0.8518927693367004,
-0.21813972294330597,
-0.9805855751037598,
-0.7887539863586426,
0.5518730878829956,
1.4834284782409668,
0.009697763249278069,
-0.46957024931907654,
0.8214675188064575,
-0.2923501431941986,
-0.42576712369918823,
-0.127722844481468... |
javascript/reference/errors/label_not_found/index.md | JavaScript - Errors - Label not found - Error type:
`SyntaxError`. | [
-0.9257699847221375,
0.39016416668891907,
-0.7744988799095154,
-0.6393234729766846,
-0.8383396863937378,
-0.375720351934433,
0.599083423614502,
2.2964160442352295,
0.17971698939800262,
-1.4009425640106201,
1.1588914394378662,
-0.011391356587409973,
-0.6424410343170166,
0.3592906594276428,
... |
javascript/reference/errors/label_not_found/index.md | JavaScript - Errors - Label not found - What went wrong?:
In JavaScript, labels are very limited: you can only use them with `break` and `continue` statements, and you can only jump to them from a statement contained within the labeled statement. You cannot jump to this label from anywhere in the program. | [
-1.3245059251785278,
0.8845447897911072,
-0.3853934109210968,
0.4617156386375427,
0.1152433529496193,
-0.8531322479248047,
-0.29709792137145996,
1.1690078973770142,
-0.9369503855705261,
-0.3421434164047241,
-0.3252013325691223,
0.05624411627650261,
-0.5015057921409607,
0.20142723619937897,... |
javascript/reference/errors/label_not_found/index.md | JavaScript - Errors - Label not found - Examples - Unsyntactic jump:
You cannot use labels as if they are `goto`.
Example:
start: console.log("Hello, world!");
console.log("Do it again");
break start;
Instead, you can only use labels to enhance the normal semantics of `break` and `continue` statements.
Example:
s... | [
-1.1779102087020874,
0.6497682332992554,
-0.7123784422874451,
0.9109808802604675,
0.06268171221017838,
-1.4043776988983154,
0.04833994433283806,
1.0824699401855469,
-0.8002265691757202,
-0.14111338555812836,
-0.11486730724573135,
-0.0087239695712924,
-0.31474974751472473,
-0.09777873754501... |
javascript/reference/errors/delete_in_strict_mode/index.md | JavaScript - Errors - Delete in strict mode:
The JavaScript strict mode-only exception "applying the 'delete' operator to an unqualified name is deprecated" occurs when variables are attempted to be deleted using the `delete` operator. | [
-0.7273783087730408,
-0.08990979194641113,
-1.013404130935669,
0.5719521641731262,
-0.5082404017448425,
-1.2016088962554932,
1.3248602151870728,
0.6313963532447815,
-0.14204730093479156,
0.13498392701148987,
-1.0709466934204102,
-1.9670073986053467,
-0.30892878770828247,
-0.203442707657814... |
javascript/reference/errors/delete_in_strict_mode/index.md | JavaScript - Errors - Delete in strict mode - Message:
Example:
SyntaxError: Delete of an unqualified identifier in strict mode. (V8-based)
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated (Firefox)
SyntaxError: Cannot delete unqualified property 'a' in strict mode. (Safari) | [
-0.7496016621589661,
0.12552015483379364,
-0.9102287888526917,
-0.46148642897605896,
-0.6049118638038635,
-1.5281050205230713,
1.161716103553772,
0.817087709903717,
0.2674533426761627,
-0.03674190863966942,
-0.4543280005455017,
-1.103001356124878,
-0.2420331835746765,
-0.06906469166278839,... |
javascript/reference/errors/delete_in_strict_mode/index.md | JavaScript - Errors - Delete in strict mode - Error type:
`SyntaxError` in strict mode only. | [
-0.21686363220214844,
-0.09377332031726837,
-0.598031759262085,
-0.11777694523334503,
-0.6173704266548157,
-0.7197610139846802,
0.6925296187400818,
1.962592601776123,
0.4265998899936676,
-0.5265817046165466,
-0.31227239966392517,
-0.9844968318939209,
-0.24798117578029633,
0.123437590897083... |
javascript/reference/errors/delete_in_strict_mode/index.md | JavaScript - Errors - Delete in strict mode - What went wrong?:
Normal variables in JavaScript can't be deleted using the `delete` operator. In strict mode, an attempt to delete a variable will throw an error and is not allowed.
The `delete` operator can only delete properties on an object. Object properties are "qua... | [
-1.0939500331878662,
0.005389127880334854,
-1.2676475048065186,
0.18017080426216125,
-0.224803164601326,
-1.1069189310073853,
0.7147308588027954,
0.8567375540733337,
0.44606709480285645,
-0.13625355064868927,
-1.0060917139053345,
-1.4978539943695068,
0.012283505871891975,
0.136266365647315... |
javascript/reference/errors/delete_in_strict_mode/index.md | JavaScript - Errors - Delete in strict mode - Examples - Freeing the contents of a variable:
Attempting to delete a plain variable throws an error in strict mode:
Example:
"use strict";
var x;
// …
delete x;
// SyntaxError: applying the 'delete' operator to an unqualified name
// is deprecated
To free the conte... | [
0.21552607417106628,
-0.19455228745937347,
-0.9891772866249084,
0.6051599383354187,
0.05712259188294411,
-1.5448167324066162,
1.68244206905365,
1.15376877784729,
0.30129462480545044,
-0.046080391854047775,
-0.32866984605789185,
-1.0893114805221558,
-0.3326126039028168,
-0.18170028924942017... |
javascript/reference/errors/precision_range/index.md | JavaScript - Errors - Precision range:
The JavaScript exception "precision is out of range" occurs when a number that's outside of the allowed range was passed into `toExponential`, `toFixed`, or `toPrecision`. | [
-0.2259516417980194,
0.13308441638946533,
-1.344730257987976,
0.04454880207777023,
-0.2635518014431,
-2.3716633319854736,
-0.3241526782512665,
0.6553918719291687,
-0.5241154432296753,
-0.4011378288269043,
-1.3254140615463257,
0.15813899040222168,
-1.2958400249481201,
-0.582227885723114,
... |
javascript/reference/errors/precision_range/index.md | JavaScript - Errors - Precision range - Message:
Example:
RangeError: toExponential() argument must be between 0 and 100 (V8-based & Safari)
RangeError: toFixed() digits argument must be between 0 and 100 (V8-based & Safari)
RangeError: toPrecision() argument must be between 1 and 100 (V8-based & Safari)
RangeError: ... | [
-1.132363200187683,
-0.16455687582492828,
-1.020264744758606,
-0.09186135977506638,
-0.17009297013282776,
-1.9900058507919312,
0.20991650223731995,
0.22568337619304657,
-0.5612494945526123,
-0.42295804619789124,
-0.5019916296005249,
0.4505760967731476,
-1.1533745527267456,
-0.5529138445854... |
javascript/reference/errors/precision_range/index.md | JavaScript - Errors - Precision range - Error type:
`RangeError` | [
-0.3675991892814636,
0.0033016277011483908,
-1.6631355285644531,
-0.557220995426178,
-0.6142350435256958,
-0.7004486918449402,
0.6126752495765686,
1.8882520198822021,
-0.5545820593833923,
-0.7653146982192993,
-0.32801827788352966,
-0.03098810650408268,
-0.7271350622177124,
-0.0483971275389... |
javascript/reference/errors/precision_range/index.md | JavaScript - Errors - Precision range - What went wrong?:
There was an out of range precision argument in one of these methods:
- `Number.prototype.toExponential()`, which requires the arguments to be between 0 and 100, inclusive.
- `Number.prototype.toFixed()`, which requires the arguments to be between 0 and 100, i... | [
-0.7771997451782227,
-0.18362729251384735,
-1.142699122428894,
-0.18521180748939514,
0.14647793769836426,
-2.2783892154693604,
-0.1805780529975891,
0.44974032044410706,
-0.5021318197250366,
-0.14289997518062592,
-0.9462846517562866,
0.508215606212616,
-0.45294642448425293,
-1.3490672111511... |
javascript/reference/errors/precision_range/index.md | JavaScript - Errors - Precision range - Examples - Invalid cases:
Example:
(77.1234).toExponential(-1); // RangeError
(77.1234).toExponential(101); // RangeError
(2.34).toFixed(-100); // RangeError
(2.34).toFixed(1001); // RangeError
(1234.5).toPrecision(-1); // RangeError
(1234.5).toPrecision(101); // RangeError | [
-0.617102861404419,
0.3171599805355072,
-0.8525241613388062,
-0.2816840708255768,
-0.007076610345393419,
-1.6807708740234375,
0.6275394558906555,
1.08005690574646,
-0.6175587177276611,
-0.3795313239097595,
-0.4733683168888092,
0.9316868782043457,
-0.699481725692749,
0.09863438457250595,
... |
javascript/reference/errors/precision_range/index.md | JavaScript - Errors - Precision range - Examples - Valid cases:
Example:
(77.1234).toExponential(4); // 7.7123e+1
(77.1234).toExponential(2); // 7.71e+1
(2.34).toFixed(1); // 2.3
(2.35).toFixed(1); // 2.4 (note that it rounds up in this case)
(5.123456).toPrecision(5); // 5.1235
(5.123456).toPrecision(2); // 5.1
(5... | [
-0.39195236563682556,
0.7962968945503235,
-0.6983933448791504,
-0.33743441104888916,
-0.05913989618420601,
-1.518309235572815,
0.4323800206184387,
0.8306671977043152,
-0.25821271538734436,
-0.03758801892399788,
-0.7282639145851135,
0.6814576387405396,
-0.7791664600372314,
0.342794716358184... |
javascript/reference/errors/invalid_bigint_syntax/index.md | JavaScript - Errors - Invalid BigInt syntax:
The JavaScript exception "invalid BigInt syntax" occurs when a string value is being coerced to a `BigInt` but it failed to be parsed as an integer. | [
-0.39849603176116943,
-0.22157292068004608,
-0.9283773899078369,
0.15237538516521454,
-0.06823308765888214,
-1.230664849281311,
-0.0654630959033966,
1.0747480392456055,
-0.9658135175704956,
-0.5636126399040222,
-0.3366357386112213,
-0.8035616278648376,
0.06728719919919968,
-0.4515393674373... |
javascript/reference/errors/invalid_bigint_syntax/index.md | JavaScript - Errors - Invalid BigInt syntax - Message:
Example:
SyntaxError: Cannot convert x to a BigInt (V8-based)
SyntaxError: invalid BigInt syntax (Firefox)
SyntaxError: Failed to parse String to BigInt (Safari) | [
-1.0714436769485474,
0.1448609083890915,
-0.8464498519897461,
-0.5652298331260681,
-0.5815719962120056,
-1.5701428651809692,
0.04615982994437218,
0.8024152517318726,
-0.2973579466342926,
-0.9429877996444702,
0.5085845589637756,
-0.5848479866981506,
0.09873907268047333,
-0.5528099536895752,... |
javascript/reference/errors/invalid_bigint_syntax/index.md | JavaScript - Errors - Invalid BigInt syntax - Error type:
`SyntaxError`. | [
-0.47641676664352417,
0.056457702070474625,
-0.9148904085159302,
-0.4125587046146393,
-0.31644207239151,
-0.8552159070968628,
0.19820888340473175,
2.1347875595092773,
-0.6206943392753601,
-1.2291473150253296,
0.554944634437561,
-0.4875015318393707,
0.17837709188461304,
-0.23199518024921417... |
javascript/reference/errors/invalid_bigint_syntax/index.md | JavaScript - Errors - Invalid BigInt syntax - What went wrong?:
When using the `BigInt()` function to convert a string to a BigInt, the string will be parsed in the same way as source code, and the resulting value must be an integer value. | [
-0.7477564215660095,
0.058948807418346405,
-1.2578202486038208,
-0.19220753014087677,
0.2071499526500702,
-1.430973768234253,
-0.41359376907348633,
1.068511962890625,
-0.6491158604621887,
-0.40650245547294617,
0.02146376110613346,
-0.4524292051792145,
0.17263145744800568,
-0.31856605410575... |
javascript/reference/errors/invalid_bigint_syntax/index.md | JavaScript - Errors - Invalid BigInt syntax - Examples - Invalid cases:
Example:
const a = BigInt("1.5");
const b = BigInt("1n");
const c = BigInt.asIntN(4, "8n");
// SyntaxError: invalid BigInt syntax | [
-0.15702132880687714,
0.2173197865486145,
-1.1319605112075806,
-0.25706276297569275,
0.15892675518989563,
-1.3113720417022705,
-0.38332849740982056,
1.1823492050170898,
-0.9885081648826599,
-0.4575571119785309,
-0.4610704779624939,
-0.4110235273838043,
0.3119749128818512,
-0.28885686397552... |
javascript/reference/errors/invalid_bigint_syntax/index.md | JavaScript - Errors - Invalid BigInt syntax - Examples - Valid cases:
Example:
const a = BigInt("1");
const b = BigInt(" 1 ");
const c = BigInt.asIntN(4, "8"); | [
-0.1231279969215393,
0.32601526379585266,
-1.468697428703308,
-0.03391062468290329,
0.04692986607551575,
-1.1222561597824097,
-0.3360940217971802,
1.304112195968628,
-0.8984327912330627,
-0.4937053620815277,
-0.336654931306839,
-0.5253397226333618,
0.36034929752349854,
-0.5473114252090454,... |
javascript/reference/errors/missing_name_after_dot_operator/index.md | JavaScript - Errors - Missing name after dot operator:
The JavaScript exception "missing name after . operator" occurs when there is a problem with how the dot operator (`.`) is used for property access. | [
-0.5069055557250977,
-0.9290192723274231,
-1.6046653985977173,
0.5173287391662598,
-0.05353444442152977,
-0.8714652061462402,
0.8571965098381042,
0.6796400547027588,
-0.7638105154037476,
-0.6975928544998169,
-0.2553950250148773,
-1.43351411819458,
-0.6665729880332947,
-0.5372380614280701,
... |
javascript/reference/errors/missing_name_after_dot_operator/index.md | JavaScript - Errors - Missing name after dot operator - Message:
Example:
SyntaxError: missing name after . operator (Firefox)
SyntaxError: Unexpected token '['. Expected a property name after '.'. (Safari) | [
-1.0069494247436523,
-0.5332422256469727,
-1.3108117580413818,
-0.45698630809783936,
-0.2705128490924835,
-1.1434355974197388,
0.9311186671257019,
0.8043267130851746,
-0.3472285866737366,
-0.9365967512130737,
0.35519200563430786,
-0.656180739402771,
-0.1300898641347885,
-0.7589645385742188... |
javascript/reference/errors/missing_name_after_dot_operator/index.md | JavaScript - Errors - Missing name after dot operator - Error type:
`SyntaxError` | [
-0.6095966696739197,
-0.5108318328857422,
-1.0431479215621948,
-0.516197681427002,
-0.6008621454238892,
-0.5896550416946411,
1.107269287109375,
1.3811728954315186,
-0.8405284285545349,
-1.2292619943618774,
0.7312561273574829,
-1.0258784294128418,
-0.3570908010005951,
-0.5652985572814941,
... |
javascript/reference/errors/missing_name_after_dot_operator/index.md | JavaScript - Errors - Missing name after dot operator - What went wrong?:
The dot operator (`.`) is used for property access. You will have to specify the name of the property that you want to access. For computed property access, you might need to change your property access from using a dot to using square brackets.... | [
-0.18118585646152496,
-0.10523349046707153,
-1.5539835691452026,
0.38706934452056885,
0.35225704312324524,
-1.0151851177215576,
0.6190123558044434,
0.515395998954773,
0.23008452355861664,
-0.5369365215301514,
-0.32106316089630127,
-0.34247854351997375,
-0.2579991817474365,
-0.6842931509017... |
javascript/reference/errors/missing_name_after_dot_operator/index.md | JavaScript - Errors - Missing name after dot operator - Examples - Property access:
Property accessors in JavaScript use either the dot (.) or square brackets (`[]`), but not both. Square brackets allow computed property access.
Example:
const obj = { foo: { bar: "baz", bar2: "baz2" } };
const i = 2;
obj.[foo].[bar... | [
-0.34497740864753723,
-0.27026912569999695,
-1.7344497442245483,
0.2765180468559265,
0.0914633721113205,
-1.156996250152588,
1.0906997919082642,
-0.3748476207256317,
-0.22336643934249878,
-0.5427497029304504,
-0.31379297375679016,
-0.5433343648910522,
-0.08655057102441788,
-0.8209037184715... |
javascript/reference/errors/missing_name_after_dot_operator/index.md | JavaScript - Errors - Missing name after dot operator - Examples - Property access vs. concatenation:
If you are coming from another programming language (like PHP), it is also easy to mix up the dot operator (`.`) and the concatenation operator (`+`).
Example:
console.log("Hello" . "world");
// SyntaxError: missin... | [
-0.32422271370887756,
-0.7565310001373291,
-1.339532494544983,
0.6069605350494385,
0.02683403342962265,
-1.4127649068832397,
-0.022512249648571014,
0.6469626426696777,
-0.32009780406951904,
-0.5396339893341064,
0.012453852221369743,
-0.8277488946914673,
-0.6155133843421936,
-0.868889212608... |
javascript/reference/errors/regex_invalid_named_capture_reference/index.md | JavaScript - Errors - Regex invalid named capture reference:
The JavaScript exception "invalid named capture reference in regular expression" occurs when a regular expression pattern contains a named backreference that does not refer to a named capture group before it. The similar error message "invalid named referenc... | [
-0.6146027445793152,
0.2247706651687622,
-1.1156703233718872,
0.4333762228488922,
-0.4144955277442932,
-0.36742961406707764,
1.8513473272323608,
0.3573192059993744,
-1.6998683214187622,
0.00042240775655955076,
-0.8036379218101501,
-1.208441972732544,
-0.48460888862609863,
-0.13797113299369... |
javascript/reference/errors/regex_invalid_named_capture_reference/index.md | JavaScript - Errors - Regex invalid named capture reference - Message:
Example:
SyntaxError: Invalid regular expression: /\k<x>/u: Invalid named capture referenced (V8-based)
SyntaxError: invalid named capture reference in regular expression (Firefox)
SyntaxError: Invalid regular expression: invalid \k<> named backre... | [
-0.3798421025276184,
0.6006882190704346,
-1.2095377445220947,
-0.5255641341209412,
-0.5391215085983276,
-0.6426878571510315,
1.5119457244873047,
0.9502026438713074,
-0.8223097920417786,
0.34646737575531006,
-0.33073586225509644,
-1.002878189086914,
-0.3123219907283783,
-0.4761386215686798,... |
javascript/reference/errors/regex_invalid_named_capture_reference/index.md | JavaScript - Errors - Regex invalid named capture reference - Error type:
`SyntaxError` | [
-0.20797711610794067,
0.44628453254699707,
-0.16212306916713715,
-0.4727751910686493,
-1.3382761478424072,
-0.1788201630115509,
1.2571158409118652,
1.7619127035140991,
-1.005914330482483,
-0.9280261397361755,
0.09118974953889847,
-1.061991810798645,
-0.43456053733825684,
-0.399667382240295... |
javascript/reference/errors/regex_invalid_named_capture_reference/index.md | JavaScript - Errors - Regex invalid named capture reference - What went wrong?:
You are using the escape sequence `\k` which is parsed as a named backreference, but the `\k` is either syntactically invalid or does not refer to a named capture group in the pattern.
`\k` only starts a named backreference when the patte... | [
-0.6863709092140198,
0.5109831690788269,
-1.20719575881958,
-0.4577152729034424,
-0.13680346310138702,
-1.1422898769378662,
2.1114416122436523,
0.44347476959228516,
-0.967095673084259,
0.6105994582176208,
-0.633354127407074,
-1.0052425861358643,
-0.681471586227417,
-0.07142634689807892,
... |
javascript/reference/errors/regex_invalid_named_capture_reference/index.md | JavaScript - Errors - Regex invalid named capture reference - Examples - Invalid cases:
Example:
/\k<x>/u; // Does not refer to a named capture group
/(?<x>.+)\k<y>/u; // Does not refer to an existing named capture group
/(?<x>.+)\k{x}/u; // Invalid syntax | [
-0.3892071545124054,
0.7302491068840027,
-1.6758289337158203,
0.2623583674430847,
-0.418204665184021,
-0.3069256842136383,
1.3591173887252808,
1.1037670373916626,
-1.3171398639678955,
0.16828106343746185,
-0.1709006428718567,
-0.7762110233306885,
-0.6265259385108948,
-0.3475569486618042,
... |
javascript/reference/errors/regex_invalid_named_capture_reference/index.md | JavaScript - Errors - Regex invalid named capture reference - Examples - Valid cases:
Example:
/(?<x>.+)\k<x>/u; // Refers to an existing named capture group | [
-0.27102896571159363,
0.6474470496177673,
-1.6472244262695312,
0.4486043453216553,
-0.7613698244094849,
-0.2116498053073883,
1.4866085052490234,
0.8406080007553101,
-1.4827779531478882,
0.17741206288337708,
-0.3200625479221344,
-1.1383050680160522,
-0.6632536053657532,
-0.4067378640174866,... |
javascript/reference/errors/identifier_after_number/index.md | JavaScript - Errors - Identifier after number:
The JavaScript exception "identifier starts immediately after numeric literal" occurs when an identifier started with a digit. Identifiers can only start with a letter, underscore (), or dollar sign ($). | [
-0.6574284434318542,
-0.5457392930984497,
-0.3328205347061157,
0.3444161117076874,
-0.9495725035667419,
-0.9490907192230225,
0.3815368711948395,
0.1890997290611267,
-0.2250736653804779,
-0.641208827495575,
-0.23763364553451538,
-0.8372150659561157,
-0.782156229019165,
-0.743039071559906,
... |
javascript/reference/errors/identifier_after_number/index.md | JavaScript - Errors - Identifier after number - Message:
Example:
SyntaxError: Invalid or unexpected token (V8-based)
SyntaxError: identifier starts immediately after numeric literal (Firefox)
SyntaxError: No identifiers allowed directly after numeric literal (Safari) | [
-0.7308705449104309,
-0.18093690276145935,
-0.23870038986206055,
-0.2561018764972687,
-1.0391333103179932,
-1.1682870388031006,
0.8977311849594116,
0.42469266057014465,
-0.1616649031639099,
-0.7806435227394104,
0.0933876559138298,
-0.3678511083126068,
-0.43356451392173767,
-0.4901607930660... |
javascript/reference/errors/identifier_after_number/index.md | JavaScript - Errors - Identifier after number - Error type:
`SyntaxError` | [
0.27602800726890564,
-0.5206958651542664,
-0.6693298816680908,
-0.0728137418627739,
-0.7113039493560791,
-0.9444525837898254,
1.2159128189086914,
1.7098509073257446,
-0.20116199553012848,
-0.9780732989311218,
0.1313873529434204,
-0.19707129895687103,
-0.5390751361846924,
0.120342917740345,... |
javascript/reference/errors/identifier_after_number/index.md | JavaScript - Errors - Identifier after number - What went wrong?:
The names of variables, called identifiers, conform to certain rules, which your code must adhere to!
A JavaScript identifier must start with a letter, underscore (), or dollar sign ($). They can't start with a digit! Only subsequent characters can be ... | [
-0.4019421339035034,
-1.225622534751892,
-1.114205002784729,
0.43093422055244446,
-0.424513578414917,
-1.0952370166778564,
0.3149299919605255,
-0.16878962516784668,
-1.166341781616211,
-0.44102609157562256,
-0.3692983388900757,
-0.5429023504257202,
-0.9763187766075134,
-0.7719189524650574,... |
javascript/reference/errors/identifier_after_number/index.md | JavaScript - Errors - Identifier after number - Examples - Variable names starting with numeric literals:
Variable names can't start with numbers in JavaScript. The following fails:
Example:
const 1life = "foo";
// SyntaxError: identifier starts immediately after numeric literal
const foo = 1life;
// SyntaxError: i... | [
0.2263498306274414,
-0.6731371879577637,
-0.5191443562507629,
0.5169811844825745,
0.2838405668735504,
-0.5946155786514282,
0.3477148115634918,
0.7421733140945435,
-0.4284984767436981,
-0.17855434119701385,
-0.588577389717102,
-0.41473063826560974,
-0.6980620622634888,
-0.21657168865203857,... |
javascript/reference/errors/too_much_recursion/index.md | JavaScript - Errors - Too much recursion:
The JavaScript exception "too much recursion" or "Maximum call stack size exceeded" occurs when there are too many function calls, or a function is missing a base case. | [
0.3622903823852539,
-0.1672586053609848,
-1.526556372642517,
0.10052689909934998,
-0.6772412061691284,
-0.8946881890296936,
-0.16128948330879211,
0.5764357447624207,
-1.0127854347229004,
-0.22795893251895905,
-0.7874696254730225,
0.03448178246617317,
-0.6498070955276489,
0.5356603264808655... |
javascript/reference/errors/too_much_recursion/index.md | JavaScript - Errors - Too much recursion - Message:
Example:
RangeError: Maximum call stack size exceeded (Chrome)
InternalError: too much recursion (Firefox)
RangeError: Maximum call stack size exceeded. (Safari) | [
-0.3686693608760834,
0.19768258929252625,
-1.285690188407898,
-0.802132248878479,
-0.7065412998199463,
-0.8659212589263916,
0.029506709426641464,
0.27072733640670776,
-0.831096887588501,
-0.14002783596515656,
-0.310862272977829,
0.5031677484512329,
-0.40661391615867615,
-0.1813503056764602... |
javascript/reference/errors/too_much_recursion/index.md | JavaScript - Errors - Too much recursion - Error type:
`InternalError` in Firefox; `RangeError` in Chrome and Safari. | [
-0.005757524631917477,
0.00032849525450728834,
-1.526267170906067,
-0.18792544305324554,
-0.27115514874458313,
-0.22940275073051453,
0.4732886552810669,
1.0289417505264282,
-0.9839549660682678,
-0.32229357957839966,
-0.6909337639808655,
-0.16956786811351776,
-0.473140150308609,
-0.51957780... |
javascript/reference/errors/too_much_recursion/index.md | JavaScript - Errors - Too much recursion - What went wrong?:
A function that calls itself is called a recursive function. Once a condition is met, the function stops calling itself. This is called a base case.
In some ways, recursion is analogous to a loop. Both execute the same code multiple times, and both require ... | [
0.5448212623596191,
0.33633437752723694,
-1.366405963897705,
0.716741681098938,
-0.0039252969436347485,
-0.7227818965911865,
0.27905210852622986,
0.7146114110946655,
-1.2048319578170776,
0.2236664742231369,
-1.3043168783187866,
-0.42861413955688477,
-0.6743130683898926,
0.6359671354293823,... |
javascript/reference/errors/too_much_recursion/index.md | JavaScript - Errors - Too much recursion - Examples:
This recursive function runs 10 times, as per the exit condition.
Example:
function loop(x) {
if (x >= 10)
// "x >= 10" is the exit condition
return;
// do stuff
loop(x + 1); // the recursive call
}
loop(0);
Setting this condition to an extremely hi... | [
-0.7867056131362915,
0.9332581162452698,
-1.531975269317627,
0.8008850812911987,
-0.6873898506164551,
-0.1311289668083191,
0.6457553505897522,
0.8571575880050659,
-1.3336851596832275,
-0.033985890448093414,
-0.8927343487739563,
-0.049666259437799454,
-0.38844943046569824,
0.473032027482986... |
javascript/reference/errors/too_much_recursion/index.md | JavaScript - Errors - Too much recursion - Examples - Class error: too much recursion:
Example:
class Person {
constructor() {}
set name(name) {
this.name = name; // Recursive call
}
}
const tony = new Person();
tony.name = "Tonisha"; // InternalError: too much recursion
When a value is assigned to the pr... | [
-0.27497655153274536,
0.2476075142621994,
-1.1763837337493896,
0.8225989937782288,
0.12154904752969742,
-1.2835010290145874,
0.03477095812559128,
1.0226061344146729,
-0.8928598165512085,
-0.0997355729341507,
-0.3679332435131073,
0.06973984837532043,
-0.7876685857772827,
-0.1925729364156723... |
javascript/reference/errors/unparenthesized_unary_expr_lhs_exponentiation/index.md | JavaScript - Errors - Unparenthesized unary expr lhs exponentiation:
The JavaScript exception "unparenthesized unary expression can't appear on the left-hand side of ''" occurs when a unary operator (one of `typeof`, `void`, `delete`, `await`, `!`, `~`, `+`, `-`) is used on the left operand of the exponentiation opera... | [
-0.9372835755348206,
0.0741783007979393,
-0.878830075263977,
0.044329576194286346,
-0.9074631333351135,
-0.5915432572364807,
1.1977373361587524,
2.0200071334838867,
-0.26786383986473083,
-0.4943387806415558,
-0.6654981970787048,
-0.28606024384498596,
0.2954884171485901,
-0.7839570045471191... |
javascript/reference/errors/unparenthesized_unary_expr_lhs_exponentiation/index.md | JavaScript - Errors - Unparenthesized unary expr lhs exponentiation - Message:
Example:
SyntaxError: Unary operator used immediately before exponentiation expression. Parenthesis must be used to disambiguate operator precedence (V8-based)
SyntaxError: unparenthesized unary expression can't appear on the left-hand sid... | [
-0.8517052531242371,
0.7984623312950134,
-1.133549690246582,
-0.34869781136512756,
-1.1897679567337036,
-1.074059247970581,
1.1511613130569458,
1.5714465379714966,
-0.11255482584238052,
-0.03605755418539047,
-0.8787620067596436,
-0.006589618511497974,
0.03132346644997597,
-0.67537802457809... |
javascript/reference/errors/unparenthesized_unary_expr_lhs_exponentiation/index.md | JavaScript - Errors - Unparenthesized unary expr lhs exponentiation - Error type:
`SyntaxError` | [
-0.9482530951499939,
0.7715003490447998,
-0.5558401346206665,
-0.6911649703979492,
-1.3808200359344482,
-0.579387366771698,
0.830321729183197,
1.9194904565811157,
-0.7615311145782471,
-1.0278124809265137,
-0.47703152894973755,
0.12870308756828308,
-0.2186587154865265,
-0.38356125354766846,... |
javascript/reference/errors/unparenthesized_unary_expr_lhs_exponentiation/index.md | JavaScript - Errors - Unparenthesized unary expr lhs exponentiation - What went wrong?:
You likely wrote something like this:
Example:
-a ** b
Whether it should be evaluated as `(-a) ** b` or `-(a ** b)` is ambiguous. In mathematics, -x2 means `-(x ** 2)` — and that's how many languages, including Python, Haskell, ... | [
-1.0165473222732544,
0.17107924818992615,
-0.6032856106758118,
-0.4727371633052826,
-0.37689220905303955,
-1.1912535429000854,
1.2575303316116333,
1.4262751340866089,
-0.46129950881004333,
-0.5456819534301758,
-0.9572585225105286,
0.6387516260147095,
-0.0008401210070587695,
-0.604365170001... |
javascript/reference/errors/unparenthesized_unary_expr_lhs_exponentiation/index.md | JavaScript - Errors - Unparenthesized unary expr lhs exponentiation - Examples:
When writing complex math expressions involving exponentiation, you may write something like this:
Example:
function taylorSin(x) {
return (n) => (-1 ** n * x ** (2 * n + 1)) / factorial(2 * n + 1);
// SyntaxError: unparenthesized un... | [
-1.025684118270874,
0.33175352215766907,
-0.2822100818157196,
0.14731056988239288,
-0.09756382554769516,
-0.6325116753578186,
1.0565388202667236,
1.682363510131836,
-1.0953892469406128,
0.576030433177948,
-0.32132619619369507,
1.0577352046966553,
-0.6245478391647339,
-0.7944012880325317,
... |
javascript/reference/errors/private_setter_only/index.md | JavaScript - Errors - Private setter only:
The JavaScript exception "getting private setter-only property" occurs when reading the value of a private element for which only a setter is defined. | [
-0.549893319606781,
0.15525409579277039,
-1.730355143547058,
0.8743690848350525,
-0.1178983524441719,
-1.1974130868911743,
0.7362856268882751,
1.1541807651519775,
0.01716770976781845,
-0.14367161691188812,
-0.13239505887031555,
-0.7917608618736267,
-0.4181823432445526,
-0.6416585445404053,... |
javascript/reference/errors/private_setter_only/index.md | JavaScript - Errors - Private setter only - Message:
Example:
TypeError: '#x' was defined without a getter (V8-based)
TypeError: getting private setter-only property (Firefox)
TypeError: Trying to access an undefined private getter (Safari) | [
-1.0653178691864014,
-0.3088160753250122,
-1.731139898300171,
0.0362631231546402,
-0.5509806275367737,
-0.8122597932815552,
0.9445165395736694,
1.1530227661132812,
0.032588131725788116,
-0.2245176136493683,
0.28678688406944275,
-0.40945541858673096,
-0.5911575555801392,
-1.282077670097351,... |
javascript/reference/errors/private_setter_only/index.md | JavaScript - Errors - Private setter only - Error type:
`TypeError` | [
-1.0168298482894897,
-0.05595713108778,
-1.4746400117874146,
0.3033749461174011,
-0.1288246512413025,
-0.09799492359161377,
1.046609878540039,
1.6805998086929321,
0.002750215819105506,
-0.6220618486404419,
0.4183184504508972,
-0.2235790193080902,
0.12945930659770966,
-0.7538887858390808,
... |
javascript/reference/errors/private_setter_only/index.md | JavaScript - Errors - Private setter only - What went wrong?:
There is an attempt to get the value of a private element for which only a setter is specified. Unlike normal objects, where an undefined getter just means the property would always return undefined, for private elements, this is an error. | [
-0.8300734758377075,
-0.1062871664762497,
-1.987038254737854,
0.5086708664894104,
-0.07246370613574982,
-1.0943466424942017,
0.7920355796813965,
0.8978630900382996,
-0.03828858211636543,
-0.05446339026093483,
0.02804800495505333,
-0.5445642471313477,
-0.6546982526779175,
-0.542934954166412... |
javascript/reference/errors/private_setter_only/index.md | JavaScript - Errors - Private setter only - Examples - Private element with no getter:
Here, `#name` has no getter, so trying to read it using `this.#name` will throw an error.
Example:
class Person {
set #name(value) {}
get name() {
return this.#name;
}
}
const person = new Person();
console.log(person.... | [
-0.429293155670166,
-0.16167642176151276,
-1.2988104820251465,
0.0276869535446167,
-0.09998344630002975,
-1.492459774017334,
0.9002952575683594,
0.9488974213600159,
0.08546540886163712,
-0.3411887288093567,
0.3286593556404114,
-0.39922642707824707,
-0.748842179775238,
-0.8503478765487671,
... |
javascript/reference/errors/regex_invalid_range_in_character_class/index.md | JavaScript - Errors - Regex invalid range in character class:
The JavaScript exception "invalid range in character class" occurs when a character class in a regular expression uses a range, but the start of the range is greater than the end. | [
-0.0659811794757843,
0.04251900687813759,
-0.5247008204460144,
0.04995359852910042,
0.4813165068626404,
-1.158446192741394,
0.3441421091556549,
0.9402912259101868,
-0.8220568299293518,
-0.7938618063926697,
-0.47985705733299255,
-0.9389917254447937,
-0.7677629590034485,
-0.9469776153564453,... |
javascript/reference/errors/regex_invalid_range_in_character_class/index.md | JavaScript - Errors - Regex invalid range in character class - Message:
Example:
SyntaxError: Invalid regular expression: /[2-1]/: Range out of order in character class (V8-based)
SyntaxError: invalid range in character class (Firefox)
SyntaxError: Invalid regular expression: range out of order in character class (Sa... | [
-0.43073809146881104,
0.4316489100456238,
-0.35937222838401794,
-0.7679689526557922,
0.10508494079113007,
-1.4691194295883179,
0.4801798164844513,
0.9140920042991638,
-0.2847514748573303,
-0.507988452911377,
-0.155815988779068,
-0.3789283335208893,
-0.6126991510391235,
-1.2961809635162354,... |
javascript/reference/errors/regex_invalid_range_in_character_class/index.md | JavaScript - Errors - Regex invalid range in character class - Error type:
`SyntaxError` | [
-0.16358280181884766,
0.6690834760665894,
0.12246330082416534,
-0.9710180163383484,
-0.24933093786239624,
-1.0445148944854736,
0.5476007461547852,
1.5564478635787964,
-0.4185180068016052,
-1.1748299598693848,
0.26000428199768066,
-0.23362867534160614,
-0.4623958170413971,
-0.87898170948028... |
javascript/reference/errors/regex_invalid_range_in_character_class/index.md | JavaScript - Errors - Regex invalid range in character class - What went wrong?:
In character classes, you can join two characters with a hyphen `-` to represent an inclusive interval of characters based on their Unicode code points. For example, `[a-z]` matches any lowercase letter. However, if the end of the range i... | [
-0.7451221942901611,
0.11015518754720688,
-0.20397162437438965,
-0.4091566205024719,
0.6910539865493774,
-1.024142861366272,
1.0120166540145874,
0.7614525556564331,
-0.36232995986938477,
-0.5583218932151794,
-0.3729935884475708,
0.2957059442996979,
0.03733351081609726,
-0.7212788462638855,... |
javascript/reference/errors/regex_invalid_range_in_character_class/index.md | JavaScript - Errors - Regex invalid range in character class - Examples - Invalid cases:
Example:
/[9-1]/; // The range is out of order
/[_-=]/; // _ has value 95, = has value 61 | [
0.1226472407579422,
0.6487858295440674,
-0.3482127785682678,
-0.6542801856994629,
0.21038471162319183,
-1.1134212017059326,
0.2931091785430908,
1.1021811962127686,
-0.5458040833473206,
-0.4249378740787506,
-0.25678056478500366,
-0.14419148862361908,
-0.6190235018730164,
-0.9941647052764893... |
javascript/reference/errors/regex_invalid_range_in_character_class/index.md | JavaScript - Errors - Regex invalid range in character class - Examples - Valid cases:
Example:
/[1-9]/; // Swap the range
/[_\-=]/; // Escape the hyphen so it matches the literal character | [
-0.2561325132846832,
0.7729817032814026,
-0.17035222053527832,
-0.3626752495765686,
0.2748717963695526,
-1.4182093143463135,
0.7565245628356934,
0.9893240332603455,
-0.4149254262447357,
-0.7145355343818665,
-0.3319929838180542,
-0.24772080779075623,
-0.816821813583374,
-0.8440331816673279,... |
javascript/reference/errors/cyclic_prototype/index.md | JavaScript - Errors - Cyclic prototype:
The JavaScript exception "TypeError: can't set prototype: it would cause a prototype chain cycle" occurs when an object's prototype is set to an object such that the prototype chain becomes circular (`a` and `b` both have each other in their prototype chains). | [
-0.2468705028295517,
-0.24286291003227234,
-1.3359787464141846,
0.8275539875030518,
-0.15662781894207,
-0.548660933971405,
-0.4528694450855255,
1.2419698238372803,
0.22305771708488464,
-0.37774187326431274,
-0.3797832131385803,
-0.6266840100288391,
-0.05515190213918686,
-0.7279018759727478... |
javascript/reference/errors/cyclic_prototype/index.md | JavaScript - Errors - Cyclic prototype - Message:
Example:
TypeError: Cyclic __proto__ value (V8-based)
TypeError: can't set prototype: it would cause a prototype chain cycle (Firefox)
TypeError: cyclic __proto__ value (Safari) | [
-0.6831182837486267,
-0.40809082984924316,
-1.0849356651306152,
0.10876493155956268,
-0.41098690032958984,
-0.4749491214752197,
0.5313670635223389,
1.5299609899520874,
-0.08234403282403946,
-0.33378323912620544,
0.16785286366939545,
-0.5865965485572815,
0.043187424540519714,
-1.07223856449... |
javascript/reference/errors/cyclic_prototype/index.md | JavaScript - Errors - Cyclic prototype - Error type:
`TypeError` | [
-0.3889446556568146,
-0.13494326174259186,
-0.8655157089233398,
-0.10934974253177643,
-0.6498191356658936,
0.07336507737636566,
0.7326770424842834,
1.6907657384872437,
-0.3263695240020752,
-0.257440447807312,
0.3793064057826996,
-0.9699333906173706,
0.013739860616624355,
-0.538833439350128... |
javascript/reference/errors/cyclic_prototype/index.md | JavaScript - Errors - Cyclic prototype - What went wrong?:
A loop, also called a cycle, was introduced in a prototype chain. That means that when walking this prototype chain, the same place would be accessed over and over again, instead of eventually reaching `null`.
This error is thrown at the time of setting the p... | [
-0.12778505682945251,
-0.0907382220029831,
-1.604468584060669,
0.9399239420890808,
0.14691632986068726,
-0.5965619683265686,
-0.18585442006587982,
1.214523196220398,
-0.8280707597732544,
0.3291773796081543,
-0.20749737322330475,
-0.6336540579795837,
0.09636133164167404,
-0.1797637939453125... |
javascript/reference/errors/cyclic_prototype/index.md | JavaScript - Errors - Cyclic prototype - Examples:
Example:
const a = {};
Object.setPrototypeOf(a, a);
// TypeError: can't set prototype: it would cause a prototype chain cycle
Example:
const a = {};
const b = {};
const c = {};
Object.setPrototypeOf(a, b);
Object.setPrototypeOf(b, c);
Object.setPrototypeOf(c, a);
/... | [
0.16155458986759186,
-0.2948289215564728,
-1.5452243089675903,
0.13674747943878174,
-0.1039087176322937,
-0.6630640625953674,
-0.4126708507537842,
1.1679352521896362,
0.5377963781356812,
-0.03515883535146713,
-0.07571712136268616,
-0.44942882657051086,
0.42520666122436523,
-0.8561494946479... |
javascript/reference/errors/bad_await/index.md | JavaScript - Errors - Bad await:
The JavaScript exception "await is only valid in async functions, async generators and modules" occurs when an `await` expression is used outside of async functions or modules or other async contexts. | [
0.2538200318813324,
-0.06553159654140472,
-1.342029094696045,
0.8437364101409912,
-0.7552638649940491,
-1.8281227350234985,
-0.2975866496562958,
1.2357128858566284,
-1.0170339345932007,
0.24190932512283325,
-0.5720662474632263,
-0.9194686412811279,
0.10740836709737778,
-0.3711954653263092,... |
javascript/reference/errors/bad_await/index.md | JavaScript - Errors - Bad await - Message:
Example:
SyntaxError: await is only valid in async functions and the top level bodies of modules (V8-based)
SyntaxError: await is only valid in async functions, async generators and modules (Firefox)
SyntaxError: Unexpected identifier (Safari) | [
-0.5008028149604797,
0.06993438303470612,
-1.4243398904800415,
0.4161514341831207,
-0.8550406098365784,
-1.7383795976638794,
0.06190081685781479,
1.0927742719650269,
-0.9161469340324402,
0.14637082815170288,
-0.044005658477544785,
-0.5175725817680359,
-0.1384553164243698,
0.156380668282508... |
javascript/reference/errors/bad_await/index.md | JavaScript - Errors - Bad await - Error type:
`SyntaxError`. | [
0.06781044602394104,
0.173386812210083,
-0.7721148133277893,
-0.0998181477189064,
-0.7000834345817566,
-0.4631640911102295,
0.5955471396446228,
2.678718090057373,
-0.4436674118041992,
-0.6180245876312256,
0.406406044960022,
-0.4541216790676117,
-0.16779538989067078,
-0.04417068883776665,
... |
javascript/reference/errors/bad_await/index.md | JavaScript - Errors - Bad await - What went wrong?:
JavaScript execution is never blocking: an `await` can never block the execution of the program. Instead, it pauses the execution of the surrounding async task, while allowing other tasks to continue running. Therefore, `await` cannot be used in sync tasks, such as f... | [
0.15533918142318726,
-0.0003482222091406584,
-1.482487440109253,
0.9490679502487183,
-0.6296289563179016,
-1.2488535642623901,
-0.1219831183552742,
1.2089399099349976,
-0.41077572107315063,
-0.10044002532958984,
-0.637368381023407,
-0.7164210677146912,
-0.522810161113739,
0.232894733548164... |
javascript/reference/errors/bad_await/index.md | JavaScript - Errors - Bad await - Examples - Top-level await:
You cannot use `await` at the top level of a script:
Example:
<script>
await fetch("https://example.com");
// SyntaxError: await is only valid in async functions, async generators and modules
</script>
Instead, make the script a module:
Example:
<s... | [
-0.1318827122449875,
0.08948805928230286,
-0.8380070328712463,
0.5207051038742065,
-0.38405606150627136,
-1.5141724348068237,
-0.10543464869260788,
1.1814650297164917,
-1.285750389099121,
-0.16939197480678558,
-0.35604214668273926,
0.5996842980384827,
-0.43543741106987,
-0.0793600380420684... |
javascript/reference/errors/bad_await/index.md | JavaScript - Errors - Bad await - Examples - Async callbacks:
You cannot use `await` in a sync callback:
Example:
urls.forEach((url) => {
await fetch(url);
// SyntaxError: await is only valid in async functions, async generators and modules
});
Instead, make the callback async. See more explanation in the Using... | [
-0.602241575717926,
0.7457050085067749,
-1.006820559501648,
0.10447657108306885,
-0.9975734949111938,
-1.1446560621261597,
0.2984110116958618,
1.0208770036697388,
-1.4100488424301147,
-0.18390505015850067,
-0.45496129989624023,
0.6814907193183899,
0.22495530545711517,
0.11428626626729965,
... |
javascript/reference/errors/redeclared_parameter/index.md | JavaScript - Errors - Redeclared parameter:
The JavaScript exception "redeclaration of formal parameter" occurs when the same variable name occurs as a function parameter and is then redeclared using a `let` assignment in a function body again. | [
-0.18756622076034546,
-0.1208341121673584,
-1.3487046957015991,
0.5410459041595459,
-0.5099802017211914,
-0.9580859541893005,
0.9837356209754944,
0.38247033953666687,
-1.0111557245254517,
-0.5612648129463196,
-0.6516600251197815,
-1.0426075458526611,
0.18001218140125275,
0.3905709683895111... |
javascript/reference/errors/redeclared_parameter/index.md | JavaScript - Errors - Redeclared parameter - Message:
Example:
SyntaxError: Identifier "x" has already been declared (V8-based)
SyntaxError: redeclaration of formal parameter "x" (Firefox)
SyntaxError: Cannot declare a let variable twice: 'x'. (Safari) | [
-0.4499172568321228,
0.11242382973432541,
-1.2923060655593872,
0.34825053811073303,
-1.0761727094650269,
-1.2188931703567505,
0.9808636903762817,
1.1971369981765747,
-0.4166800081729889,
-0.36401405930519104,
0.20635850727558136,
-0.6796685457229614,
0.4321361482143402,
-0.0399270653724670... |
javascript/reference/errors/redeclared_parameter/index.md | JavaScript - Errors - Redeclared parameter - Error type:
`SyntaxError` | [
0.03939337655901909,
0.32206597924232483,
-0.8700582981109619,
-0.11227288842201233,
-0.5487922430038452,
-0.5974215865135193,
1.5182210206985474,
2.005237102508545,
-0.4211758077144623,
-0.7689926028251648,
0.1201852336525917,
-0.14574305713176727,
0.11101873219013214,
0.3540956676006317,... |
javascript/reference/errors/redeclared_parameter/index.md | JavaScript - Errors - Redeclared parameter - What went wrong?:
The same variable name occurs as a function parameter and is then redeclared using a `let` assignment in a function body again. Redeclaring the same variable within the same function or block scope using `let` is not allowed in JavaScript. | [
0.07676735520362854,
0.46897539496421814,
-1.812045931816101,
0.4962499141693115,
-0.1277233064174652,
-0.8881087899208069,
0.27746203541755676,
0.5658032894134521,
-1.2153759002685547,
-0.7019815444946289,
-0.3360093832015991,
-0.5837177634239197,
0.2974855303764343,
-0.003212359268218279... |
javascript/reference/errors/redeclared_parameter/index.md | JavaScript - Errors - Redeclared parameter - Examples - Redeclared argument:
In this case, the variable "arg" redeclares the argument.
Example:
function f(arg) {
let arg = "foo";
}
// SyntaxError: redeclaration of formal parameter "arg"
If you want to change the value of "arg" in the function body, you can do so... | [
-0.19643855094909668,
-0.08256179839372635,
-0.6257337331771851,
0.12981726229190826,
0.28920018672943115,
-2.7658567428588867,
1.1741007566452026,
0.490287184715271,
-0.6680429577827454,
-0.4360664188861847,
-0.3779899775981903,
-0.7024120092391968,
-0.3605441749095917,
0.4410942494869232... |
javascript/reference/errors/already_has_pragma/index.md | JavaScript - Errors - Already has pragma:
The JavaScript warning "-file- is being assigned a //# sourceMappingURL, but already has one." occurs when a source map has been specified more than once for a given JavaScript source. | [
-0.5169342756271362,
-0.0033640156034380198,
-1.626168966293335,
0.5648455023765564,
-0.9759202003479004,
-1.9594086408615112,
0.5517596006393433,
0.9577586054801941,
-1.3839391469955444,
-0.23101747035980225,
0.1897059828042984,
-0.7103175520896912,
0.709701418876648,
-0.5790860652923584,... |
javascript/reference/errors/already_has_pragma/index.md | JavaScript - Errors - Already has pragma - Message:
Example:
Warning: -file- is being assigned a //# sourceMappingURL, but already has one. | [
-0.8567844033241272,
0.6050600409507751,
-1.4243048429489136,
-0.05573210120201111,
-1.1704150438308716,
-1.6431723833084106,
0.39170554280281067,
1.2279249429702759,
-1.074821949005127,
-0.43114688992500305,
0.03530140966176987,
-0.5519672632217407,
0.9112964272499084,
-0.3026669025421142... |
javascript/reference/errors/already_has_pragma/index.md | JavaScript - Errors - Already has pragma - Error type:
A warning. JavaScript execution won't be halted. | [
0.017855482175946236,
1.008089303970337,
-1.04233717918396,
-0.02338656783103943,
-1.1502982378005981,
-0.31398284435272217,
0.9786397814750671,
1.9366176128387451,
-0.4904975891113281,
-0.5666688680648804,
-0.8854127526283264,
-0.7764027714729309,
0.2010306864976883,
-0.07755934447050095,... |
javascript/reference/errors/already_has_pragma/index.md | JavaScript - Errors - Already has pragma - What went wrong?:
A source map has been specified more than once for a given JavaScript source.
JavaScript sources are often combined and minified to make delivering them from the server more efficient. With source maps, the debugger can map the code being executed to the or... | [
-0.3194233775138855,
-0.16964270174503326,
-1.1566853523254395,
0.49393999576568604,
-0.03702310472726822,
-1.3395252227783203,
0.41024136543273926,
0.08713371306657791,
-0.7394369840621948,
0.15989260375499725,
-0.32945701479911804,
-0.14775682985782623,
0.1132986769080162,
-0.36182016134... |
javascript/reference/errors/already_has_pragma/index.md | JavaScript - Errors - Already has pragma - Examples - Setting source maps:
Setting a source map by using a comment in the file:
Example:
//# sourceMappingURL=http://example.com/path/to/your/sourcemap.map
Or, alternatively, you can set a header to your JavaScript file:
Example:
X-SourceMap: /path/to/file.js.map | [
-1.0074139833450317,
-0.5496668219566345,
-0.636094868183136,
0.8723366856575012,
-0.4702441692352295,
-1.376819372177124,
0.9817790985107422,
0.9114332795143127,
-0.15201841294765472,
-0.25356781482696533,
-0.07001471519470215,
-0.32559525966644287,
0.3494488596916199,
-0.3530087769031524... |
javascript/reference/errors/form_must_be_one_of/index.md | JavaScript - Errors - Form must be one of:
The JavaScript exception "form must be one of 'NFC', 'NFD', 'NFKC', or 'NFKD'" occurs when an unrecognized string is passed to the `String.prototype.normalize()` method. | [
-0.3519588112831116,
0.056051503866910934,
-0.6410025954246521,
-0.39143499732017517,
0.030092233791947365,
-1.5118129253387451,
1.067905068397522,
0.02313511073589325,
-0.7349291443824768,
0.1036035493016243,
-1.2150908708572388,
-1.5986874103546143,
-0.21040277183055878,
-0.4896237254142... |
javascript/reference/errors/form_must_be_one_of/index.md | JavaScript - Errors - Form must be one of - Message:
Example:
RangeError: The normalization form should be one of NFC, NFD, NFKC, NFKD. (V8-based)
RangeError: form must be one of 'NFC', 'NFD', 'NFKC', or 'NFKD' (Firefox)
RangeError: argument does not match any normalization form (Safari) | [
-0.8094182014465332,
-0.1035052239894867,
-1.2219220399856567,
-1.013338327407837,
-0.47432923316955566,
-1.229661226272583,
0.38203099370002747,
-0.004929886665195227,
0.17061260342597961,
0.025664959102869034,
-0.3249218761920929,
-0.9586796164512634,
-0.16678738594055176,
-0.60630649328... |
javascript/reference/errors/form_must_be_one_of/index.md | JavaScript - Errors - Form must be one of - Error type:
`RangeError` | [
-0.11611761897802353,
0.6061009168624878,
-1.1197032928466797,
-0.7511469721794128,
-0.764954686164856,
-0.007066913414746523,
0.14550668001174927,
1.9571863412857056,
-0.7480027675628662,
-1.2325345277786255,
-0.21370257437229156,
-0.4313317835330963,
-0.5680288076400757,
-0.4812200069427... |
javascript/reference/errors/form_must_be_one_of/index.md | JavaScript - Errors - Form must be one of - What went wrong?:
The `String.prototype.normalize()` method only accepts the following four values as its `form` argument: `"NFC"`, `"NFD"`, `"NFKC"`, or `"NFKD"`. If you pass any other value, an error will be thrown. Read the reference of `normalize()` to learn about differ... | [
-0.6514942049980164,
-0.03649187460541725,
-0.9490460753440857,
-0.35391443967819214,
0.04569768160581589,
-1.1873779296875,
1.0232881307601929,
0.4124157428741455,
-0.23533998429775238,
0.28304991126060486,
-1.2142815589904785,
-1.0350464582443237,
0.7727178931236267,
-0.9018678069114685,... |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.