file
stringlengths
16
94
text
stringlengths
32
24.4k
vector
list
javascript/reference/global_objects/number/tostring/index.md
JavaScript - Global Objects - Number - toString - Syntax: Example: toString() toString(radix)
[ -0.5414940714836121, 0.6361712217330933, -0.36384159326553345, -0.6067668199539185, -0.8997887969017029, -2.3521344661712646, 0.45659565925598145, 0.26795169711112976, -0.20036329329013824, -1.068843960762024, -0.7133711576461792, 0.23814982175827026, -0.778258740901947, -0.186150342226028...
javascript/reference/global_objects/number/tostring/index.md
JavaScript - Global Objects - Number - toString - Syntax - Parameters: - `radix` (optional): An integer in the range `2` through `36` specifying the base to use for representing the number value. Defaults to 10.
[ -0.010401751846075058, -0.07108275592327118, -0.9142964482307434, -0.791379451751709, -0.9044509530067444, -1.99575936794281, 0.7183363437652588, -0.2224753350019455, 0.35692787170410156, -0.5230886340141296, -1.0959807634353638, 0.48030176758766174, -1.1956515312194824, 0.2816097140312195...
javascript/reference/global_objects/number/tostring/index.md
JavaScript - Global Objects - Number - toString - Syntax - Return value: A string representing the specified number value. Scientific notation is used if radix is 10 and the number's magnitude (ignoring sign) is greater than or equal to 1021 or less than 10-6.
[ -0.9627410769462585, 0.31808432936668396, -0.08168007433414459, -0.4731558561325073, -0.8687636256217957, -2.1597442626953125, 0.6805393695831299, -0.0314970538020134, -0.330973356962204, -0.25985512137413025, -1.0706387758255005, 0.9945446848869324, -0.8547933101654053, 0.4526887536048889...
javascript/reference/global_objects/number/tostring/index.md
JavaScript - Global Objects - Number - toString - Syntax - Exceptions: - `RangeError`: Thrown if `radix` is less than 2 or greater than 36. - `TypeError`: Thrown if this method is invoked on an object that is not a `Number`.
[ -0.5768232345581055, -0.06702243536710739, 0.03265979140996933, -0.2549290955066681, -0.623748779296875, -2.098752021789551, -0.06778328865766525, 0.46167048811912537, -0.4723030924797058, -0.7062942981719971, -0.7724695801734924, 0.1506381630897522, -1.020820140838623, -0.3702684640884399...
javascript/reference/global_objects/number/tostring/index.md
JavaScript - Global Objects - Number - toString - Description: The `Number` object overrides the `toString` method of `Object`; it does not inherit `Object.prototype.toString()`. For `Number` values, the `toString` method returns a string representation of the value in the specified radix. For radixes above 10, the l...
[ 0.029310839250683784, 0.04194405674934387, -0.2792636752128601, 0.09721630066633224, 0.765256941318512, -0.9929486513137817, 0.24660803377628326, 0.4617684781551361, -0.4496629238128662, 0.06930471956729889, -0.6549020409584045, 0.38435494899749756, -1.1341370344161987, 0.6705209016799927,...
javascript/reference/global_objects/number/tostring/index.md
JavaScript - Global Objects - Number - toString - Examples - Using toString(): Example: const count = 10; console.log(count.toString()); // "10" console.log((17).toString()); // "17" console.log((17.2).toString()); // "17.2" const x = 6; console.log(x.toString(2)); // "110" console.log((254).toString(16)); // "fe" ...
[ -0.3465912640094757, 0.0930418148636818, -0.9628342390060425, -0.4426296651363373, -0.3290892243385315, -2.0636801719665527, -0.2541235387325287, -0.19266393780708313, -0.14799028635025024, -0.2752828598022461, -0.4361942708492279, 0.5252783894538879, -0.6085562109947205, -0.01340584550052...
javascript/reference/global_objects/number/tostring/index.md
JavaScript - Global Objects - Number - toString - Examples - Converting radix of number strings: If you have a string representing a number in a non-decimal radix, you can use `parseInt()` and `toString()` to convert it to a different radix. Example: const hex = "CAFEBABE"; const bin = parseInt(hex, 16).toString(2);...
[ -0.6148263812065125, 0.339968740940094, -0.09563782811164856, 0.27113717794418335, 0.10427571833133698, -1.8356584310531616, 0.7713489532470703, -0.2521602213382721, 0.20341923832893372, -0.20050445199012756, -0.633346438407898, -0.16363337635993958, -0.7794490456581116, -0.527146577835083...
javascript/reference/global_objects/number/isfinite/index.md
JavaScript - Global Objects - Number - isFinite: The `Number.isFinite()` static method determines whether the passed value is a finite number — that is, it checks that a given value is a number, and the number is neither positive `Infinity`, negative `Infinity`, nor `NaN`. Example: console.log(Number.isFinite(1 / 0)...
[ -1.146659255027771, -0.6755260229110718, -0.8048365116119385, -0.0650385171175003, -0.2732047140598297, -2.110751152038574, 0.9531187415122986, 0.25985148549079895, -0.369526743888855, 0.6826331615447998, -1.0952235460281372, -0.5577757358551025, 0.28450116515159607, 0.19069795310497284, ...
javascript/reference/global_objects/number/isfinite/index.md
JavaScript - Global Objects - Number - isFinite - Syntax: Example: Number.isFinite(value)
[ -0.04359252378344536, 0.4129442274570465, -0.37816789746284485, -0.4828130602836609, -0.8293861746788025, -1.7964025735855103, 1.0451791286468506, 0.36217793822288513, -0.5406627058982849, -0.1361282914876938, -0.9265534281730652, 0.182312473654747, -0.03200960159301758, 0.4918266832828522...
javascript/reference/global_objects/number/isfinite/index.md
JavaScript - Global Objects - Number - isFinite - Syntax - Parameters: - `value`: The value to be tested for finiteness.
[ 0.05903587117791176, 0.3411155045032501, -0.3739283084869385, -0.7446335554122925, -0.6556645035743713, -1.9196429252624512, 1.103197693824768, 0.5595315098762512, 0.1543056070804596, -0.11726047843694687, -1.1411011219024658, 0.11368817090988159, -0.008233550935983658, 0.8367111682891846,...
javascript/reference/global_objects/number/isfinite/index.md
JavaScript - Global Objects - Number - isFinite - Syntax - Return value: The boolean value `true` if the given value is a finite number. Otherwise `false`.
[ -1.0743097066879272, 0.25473690032958984, -0.338065505027771, -0.25347381830215454, -0.907768189907074, -2.261439561843872, 1.2015661001205444, 0.6411188840866089, -0.4820472300052643, -0.10551896691322327, -1.4591577053070068, -0.10471981018781662, 0.44181519746780396, 0.36939430236816406...
javascript/reference/global_objects/number/isfinite/index.md
JavaScript - Global Objects - Number - isFinite - Examples - Using isFinite(): Example: Number.isFinite(Infinity); // false Number.isFinite(NaN); // false Number.isFinite(-Infinity); // false Number.isFinite(0); // true Number.isFinite(2e64); // true
[ -0.956673800945282, 0.2944916784763336, 0.11638446897268295, -0.11675257980823517, -0.6958467364311218, -1.6037750244140625, 1.1988286972045898, 0.043152447789907455, -0.6949337720870972, -0.2602275311946869, -1.4343039989471436, -0.42687541246414185, 0.19831141829490662, -0.20674641430377...
javascript/reference/global_objects/number/isfinite/index.md
JavaScript - Global Objects - Number - isFinite - Examples - Difference between Number.isFinite() and global isFinite(): In comparison to the global `isFinite()` function, this method doesn't first convert the parameter to a number. This means only values of the type number and are finite return `true`, and non-number...
[ -0.9062919616699219, 0.1860792338848114, -0.6735644340515137, -0.2577047049999237, -0.49620285630226135, -2.0535147190093994, 0.17255185544490814, 0.3409646153450012, -0.45793405175209045, 0.6014730334281921, -1.304971694946289, -0.4482085406780243, 0.16924412548542023, 0.17167183756828308...
javascript/reference/global_objects/number/negative_infinity/index.md
JavaScript - Global Objects - Number - NEGATIVE_INFINITY: The `Number.NEGATIVE_INFINITY` static data property represents the negative Infinity value. Example: function checkNumber(smallNumber) { if (smallNumber === Number.NEGATIVE_INFINITY) { return "Process number as -Infinity"; } return smallNumber; } c...
[ -1.9448935985565186, -0.47124484181404114, -0.79954993724823, 0.2044747769832611, -0.1516907811164856, -1.466303825378418, -0.3262999653816223, 0.6961374878883362, -0.23848922550678253, 0.943406879901886, -0.925754964351654, -0.1912359744310379, 0.4674164056777954, -0.28191283345222473, ...
javascript/reference/global_objects/number/negative_infinity/index.md
JavaScript - Global Objects - Number - NEGATIVE_INFINITY - Value: The same as the negative value of the global `Infinity` property.
[ -1.1586191654205322, -0.25284573435783386, -0.19586578011512756, -0.1819484829902649, -0.3837202787399292, -2.0649096965789795, 0.6809256076812744, 1.1027437448501587, 0.4379119873046875, -0.029330115765333176, -0.9525320529937744, -0.26911482214927673, -0.16377155482769012, -0.22340461611...
javascript/reference/global_objects/number/negative_infinity/index.md
JavaScript - Global Objects - Number - NEGATIVE_INFINITY - Description: The `Number.NEGATIVE_INFINITY` value behaves slightly differently than mathematical infinity: - Any positive value, including `POSITIVE_INFINITY`, multiplied by `NEGATIVE_INFINITY` is `NEGATIVE_INFINITY`. - Any negative value, including `NEGATIVE...
[ -1.386740803718567, -0.3062502443790436, -0.17931367456912994, 0.053657643496990204, -0.4613179862499237, -1.3454821109771729, 0.5543583035469055, 0.8374620079994202, -0.07920687645673752, 0.5402902960777283, -1.6151798963546753, -0.3279045820236206, -1.00421941280365, -0.06367035210132599...
javascript/reference/global_objects/number/negative_infinity/index.md
JavaScript - Global Objects - Number - NEGATIVE_INFINITY - Examples - Using NEGATIVE_INFINITY: In the following example, the variable `smallNumber` is assigned a value that is smaller than the minimum value. When the `if` statement executes, `smallNumber` has the value `-Infinity`, so `smallNumber` is set to a more ma...
[ -1.9024076461791992, 0.24066004157066345, -0.6926761269569397, 0.5517289638519287, -0.3615308105945587, -1.559433937072754, 1.0166057348251343, 0.487374871969223, -0.3727540671825409, 0.8257846236228943, -1.07613205909729, -0.18626262247562408, -0.12330812960863113, -0.47297564148902893, ...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString: The `toLocaleString()` method of `Number` values returns a string with a language-sensitive representation of this number. In implementations with `Intl.NumberFormat` API support, this method delegates to `Intl.NumberFormat`. Every time `toLocaleString` is called...
[ -0.0199540127068758, -0.4546296000480652, -0.09295916557312012, 0.21831142902374268, 0.6726613640785217, -0.7868316173553467, 1.0567044019699097, 0.1286076456308365, -0.21062211692333221, 0.3822498321533203, -0.5752237439155579, 0.12927670776844025, -0.3086380064487457, 0.5149533748626709,...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString - Syntax: Example: toLocaleString() toLocaleString(locales) toLocaleString(locales, options)
[ -0.48229095339775085, 0.7484201788902283, -0.1289994865655899, -0.17672161757946014, -0.5240694880485535, -2.3943026065826416, 0.5494755506515503, 0.25876376032829285, -0.1923210620880127, -0.9990049004554749, -0.382762610912323, 0.26698005199432373, -0.0680244043469429, -0.258174926042556...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString - Syntax - Parameters: The `locales` and `options` parameters customize the behavior of the function and let applications specify the language whose formatting conventions should be used. In implementations that support the `Intl.NumberFormat` API, these parameter...
[ 0.16681797802448273, 0.5037801265716553, -0.27194705605506897, 0.3031284213066101, 0.6839364767074585, -0.6070495247840881, 1.0712964534759521, -0.2639831006526947, -0.06573289632797241, 0.09507760405540466, -0.7412209510803223, -0.43528738617897034, 0.2369234412908554, 0.2343265265226364,...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString - Syntax - Return value: A string representing the given number according to language-specific conventions. In implementations with `Intl.NumberFormat`, this is equivalent to `new Intl.NumberFormat(locales, options).format(number)`. Note: Most of the time, the fo...
[ -1.0101490020751953, 0.4019373059272766, -0.23136621713638306, -0.35000771284103394, -0.0914572924375534, -1.6266939640045166, 0.6952799558639526, 0.01033517811447382, -0.3192578852176666, 0.07582119107246399, -0.5585625171661377, 1.0660350322723389, -0.7635053992271423, 0.3941404521465301...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString - Examples - Using toLocaleString(): Basic use of this method without specifying a `locale` returns a formatted string in the default locale and with default options. Example: const number = 3500; console.log(number.toLocaleString()); // "3,500" if in U.S. Engli...
[ -0.6867009401321411, -0.05233699828386307, -0.7243248224258423, 0.1438164860010147, -0.1405993551015854, -1.46039617061615, 0.4737507998943329, -0.6385518312454224, -0.03370553255081177, -0.40810251235961914, -0.39641013741493225, 1.0137256383895874, -0.2426898181438446, -0.314089059829711...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString - Examples - Checking for support for locales and options parameters: The `locales` and `options` parameters may not be supported in all implementations, because support for the internationalization API is optional, and some systems may not have the necessary data....
[ -0.929671049118042, 0.3778582513332367, -0.21125811338424683, 0.567926287651062, -0.20493175089359283, -1.7964996099472046, 0.661287784576416, -0.5071185231208801, -0.4738484025001526, -0.13252314925193787, -0.16788041591644287, -0.4038024842739105, 0.6540430784225464, 0.2905515730381012, ...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString - Examples - Using locales: This example shows some of the variations in localized number formats. In order to get the format of the language used in the user interface of your application, make sure to specify that language (and possibly some fallback languages) u...
[ -0.6521186828613281, -0.1831699162721634, -1.0745350122451782, -0.3150274157524109, -0.11114348471164703, -0.8744441270828247, 0.5673933029174805, -0.6572612524032593, -0.6455779075622559, 0.15590880811214447, -0.8259978890419006, 0.7043597102165222, -0.46075665950775146, 0.345906972885131...
javascript/reference/global_objects/number/tolocalestring/index.md
JavaScript - Global Objects - Number - toLocaleString - Examples - Using options: The results provided by `toLocaleString()` can be customized using the `options` parameter: Example: const number = 123456.789; // request a currency format console.log( number.toLocaleString("de-DE", { style: "currency", currency: ...
[ -0.45148447155952454, 0.20367656648159027, -0.739707887172699, 0.1374940127134323, -0.06159663572907448, -0.8519960045814514, 0.2999516427516937, -0.917253851890564, 0.11715146154165268, -0.558196485042572, -0.2622956931591034, 1.10994291305542, -0.21169617772102356, -0.25919216871261597, ...
javascript/reference/global_objects/number/min_value/index.md
JavaScript - Global Objects - Number - MIN_VALUE: The `Number.MIN_VALUE` static data property represents the smallest positive numeric value representable in JavaScript. Example: function divide(x, y) { if (x / y < Number.MIN_VALUE) { return "Process as 0"; } return x / y; } console.log(divide(5e-324, 1))...
[ -1.0664929151535034, -0.2614145874977112, -0.7725620269775391, 0.7582749724388123, 0.5691535472869873, -0.7472633123397827, 0.24545009434223175, 1.0423436164855957, -0.667478621006012, 0.8426685333251953, -0.7930124402046204, 0.0114592919126153, -0.022585183382034302, -0.21267428994178772,...
javascript/reference/global_objects/number/min_value/index.md
JavaScript - Global Objects - Number - MIN_VALUE - Value: 2-1074, or `5E-324`.
[ -0.43784523010253906, -0.21324938535690308, -0.6872103214263916, 0.13357487320899963, -0.39006999135017395, -0.7106456756591797, 0.3689092993736267, 0.016139328479766846, -1.4269051551818848, 0.3683973550796509, -0.8178454041481018, 0.5205529928207397, -0.2669629752635956, -0.0324626043438...
javascript/reference/global_objects/number/min_value/index.md
JavaScript - Global Objects - Number - MIN_VALUE - Description: `Number.MIN_VALUE` is the smallest positive number (not the most negative number) that can be represented within float precision — in other words, the number closest to 0. The ECMAScript spec doesn't define a precise value that implementations are require...
[ -1.4794448614120483, -0.059244707226753235, -0.668191134929657, -0.1044103130698204, 0.21260610222816467, -1.1847540140151978, 0.4416019320487976, 0.371002733707428, -0.41166549921035767, 0.6913339495658875, -0.3457571268081665, 0.6248719096183777, 0.012703539803624153, -0.1390374004840850...
javascript/reference/global_objects/number/min_value/index.md
JavaScript - Global Objects - Number - MIN_VALUE - Examples - Using MIN_VALUE: The following code divides two numeric values. If the result is greater than or equal to `MIN_VALUE`, the `func1` function is called; otherwise, the `func2` function is called. Example: if (num1 / num2 >= Number.MIN_VALUE) { func1(); } ...
[ -1.2430082559585571, 0.3483409583568573, -0.8464097380638123, 0.4335630238056183, 0.0044659702107310295, -0.1156705915927887, -0.19586816430091858, 0.4393502175807953, -0.7638357877731323, 0.43128836154937744, -0.9481890797615051, -0.2767513394355774, -0.5350532531738281, -0.04015937820076...
javascript/reference/global_objects/number/valueof/index.md
JavaScript - Global Objects - Number - valueOf: The `valueOf()` method of `Number` values returns the value of this number. Example: const numObj = new Number(42); console.log(typeof numObj); // Expected output: "object" const num = numObj.valueOf(); console.log(num); // Expected output: 42 console.log(typeof num)...
[ -0.3661441206932068, -0.698241114616394, -1.0882294178009033, -0.1818847954273224, -0.32129183411598206, -0.9004934430122375, -0.3762895464897156, 0.1463780552148819, 0.19138029217720032, -0.3222157061100006, -0.8003814816474915, 0.5928330421447754, 0.10348964482545853, 0.2980056703090668,...
javascript/reference/global_objects/number/valueof/index.md
JavaScript - Global Objects - Number - valueOf - Syntax: Example: valueOf()
[ 0.27656593918800354, -0.0680590569972992, -0.618032693862915, -0.41502970457077026, -0.5287119150161743, -1.524882435798645, 0.7157858610153198, 1.0970888137817383, 0.305069237947464, -0.9302488565444946, -0.8440396189689636, 0.5346612334251404, -0.4192962050437927, 0.2000715583562851, 1...
javascript/reference/global_objects/number/valueof/index.md
JavaScript - Global Objects - Number - valueOf - Syntax - Parameters: None.
[ 0.10552340745925903, 0.2431296706199646, -0.993859052658081, -0.6755312085151672, -0.7480431199073792, -1.1793007850646973, 0.9185010194778442, 1.063551902770996, -0.08130202442407608, -1.087151050567627, -1.0664191246032715, -0.2869509160518646, -0.20217743515968323, 0.13379260897636414, ...
javascript/reference/global_objects/number/valueof/index.md
JavaScript - Global Objects - Number - valueOf - Syntax - Return value: A number representing the primitive value of the specified `Number` object.
[ -0.04884093627333641, 0.012130800634622574, -0.7352174520492554, -0.6607198715209961, -0.7937673926353455, -1.2486402988433838, 1.1134074926376343, 0.8513718247413635, 0.015793317928910255, -0.2102137804031372, -1.3032859563827515, 0.9172533750534058, -0.8267776370048523, 1.056347250938415...
javascript/reference/global_objects/number/valueof/index.md
JavaScript - Global Objects - Number - valueOf - Description: This method is usually called internally by JavaScript and not explicitly in web code.
[ -0.38412749767303467, -0.06765493005514145, -1.1576462984085083, -0.3275996446609497, -0.5978095531463623, -1.5777742862701416, 0.16162793338298798, 0.29180753231048584, -0.6604899168014526, -0.32481005787849426, -1.1209386587142944, 0.5645731687545776, -0.04786262661218643, -0.02599243260...
javascript/reference/global_objects/number/valueof/index.md
JavaScript - Global Objects - Number - valueOf - Examples - Using valueOf: Example: const numObj = new Number(10); console.log(typeof numObj); // object const num = numObj.valueOf(); console.log(num); // 10 console.log(typeof num); // number
[ 0.01210669707506895, -0.45568400621414185, -0.9503083229064941, 0.12080946564674377, -0.5150048732757568, -1.1833709478378296, 0.0033667809329926968, -0.011124025098979473, 0.5133029222488403, -0.374358206987381, -0.48446568846702576, 0.4575602412223816, -0.2864711880683899, -0.08848834037...
javascript/reference/global_objects/number/number/index.md
JavaScript - Global Objects - Number: The `Number()` constructor creates `Number` objects. When called as a function, it returns primitive values of type Number.
[ -0.4584401249885559, -0.09887031465768814, -1.160888671875, -0.0586317703127861, -0.3563899099826813, -1.4576001167297363, 0.04049842059612274, 0.5182619690895081, -0.3568364977836609, 0.10554330050945282, -1.2909904718399048, -0.051274076104164124, -0.4343476891517639, -0.2410095930099487...
javascript/reference/global_objects/number/number/index.md
JavaScript - Global Objects - Number - Syntax: Example: new Number(value) Number(value) Note: `Number()` can be called with or without `new`, but with different effects. See Return value.
[ 0.18711940944194794, 0.24884338676929474, -1.0348024368286133, -0.2975471019744873, -0.5319703817367554, -1.8545414209365845, -0.0808381661772728, 1.0739117860794067, -0.06666114181280136, -0.5649740099906921, -0.7630101442337036, 0.8288781046867371, -0.3524172008037567, 0.0042987111955881...
javascript/reference/global_objects/number/number/index.md
JavaScript - Global Objects - Number - Syntax - Parameters: - `value`: The numeric value of the object being created.
[ 0.32738468050956726, 0.08564985543489456, -0.6220238208770752, -0.07201382517814636, -0.3925028145313263, -1.4652990102767944, 0.3576368987560272, 1.2365429401397705, 0.4001949727535248, -0.5724793672561646, -0.9453744292259216, 0.4270925223827362, -0.4959815740585327, 0.18221734464168549,...
javascript/reference/global_objects/number/number/index.md
JavaScript - Global Objects - Number - Syntax - Return value: When `Number()` is called as a function (without `new`), it returns `value` coerced to a number primitive. Specially, BigInts values are converted to numbers instead of throwing. If `value` is absent, it becomes `0`. When `Number()` is called as a construc...
[ -0.5004685521125793, 0.36571797728538513, -0.6668688058853149, 0.15561851859092712, -0.17763929069042206, -1.605444073677063, -0.08256595581769943, 0.7393782138824463, -0.4574143588542938, 0.5532292723655701, -0.9832037091255188, 0.36785420775413513, -0.5525826215744019, -0.067483000457286...
javascript/reference/global_objects/number/number/index.md
JavaScript - Global Objects - Number - Examples - Creating Number objects: Example: const a = new Number("123"); // a === 123 is false const b = Number("123"); // b === 123 is true a instanceof Number; // is true b instanceof Number; // is false typeof a; // "object" typeof b; // "number"
[ -0.10612894594669342, -0.45858034491539, -0.6009928584098816, 0.17913982272148132, -0.2309848517179489, -0.9847248792648315, -0.02298089675605297, 0.8374948501586914, 0.24236126244068146, -0.2811864912509918, -1.128537893295288, -0.06033177301287651, 0.24176211655139923, -0.076263807713985...
javascript/reference/global_objects/number/number/index.md
JavaScript - Global Objects - Number - Examples - Using Number() to convert a BigInt to a number: `Number()` is the only case where a BigInt can be converted to a number without throwing, because it's very explicit. Example: +1n; // TypeError: Cannot convert a BigInt value to a number 0 + 1n; // TypeError: Cannot mi...
[ -0.46257948875427246, 0.1741299033164978, -0.9049175381660461, -0.018066560849547386, -0.10889113694429398, -1.3841185569763184, -0.41836509108543396, 0.3446290194988251, -0.8387987017631531, -0.636549711227417, -0.7339007258415222, 0.366018682718277, -0.03277338296175003, -0.2482182234525...
javascript/reference/global_objects/number/parsefloat/index.md
JavaScript - Global Objects - Number - parseFloat: The `Number.parseFloat()` static method parses an argument and returns a floating point number. If a number cannot be parsed from the argument, it returns `NaN`. Example: function circumference(r) { if (Number.isNaN(Number.parseFloat(r))) { return 0; } ret...
[ -1.9276180267333984, -0.24176202714443207, -0.6835491061210632, -0.4364683926105499, 0.010162407532334328, -1.077412724494934, 0.04290032386779785, -0.4775756895542145, -0.5331833958625793, 1.1383757591247559, -0.7239115834236145, -0.20375210046768188, -0.21188350021839142, 0.1197289451956...
javascript/reference/global_objects/number/parsefloat/index.md
JavaScript - Global Objects - Number - parseFloat - Syntax: Example: Number.parseFloat(string)
[ -1.1606160402297974, 0.06207488104701042, -1.1001553535461426, -0.6914714574813843, -0.573431134223938, -2.0797677040100098, 0.6045397520065308, 0.0012031672522425652, -0.4829423427581787, -0.38102471828460693, -0.5025718212127686, -0.07935275137424469, -0.5209588408470154, 0.0748906210064...
javascript/reference/global_objects/number/parsefloat/index.md
JavaScript - Global Objects - Number - parseFloat - Syntax - Parameters: - `string`: The value to parse, coerced to a string. Leading `whitespace` in this argument is ignored.
[ -0.6122282147407532, 0.16125339269638062, -0.8244025707244873, -0.9098586440086365, -0.08795741200447083, -1.9778306484222412, 0.9163235425949097, 0.21546193957328796, 0.36486902832984924, 0.18900611996650696, -0.83024001121521, -0.07795233279466629, -0.5810821056365967, 0.3577039837837219...
javascript/reference/global_objects/number/parsefloat/index.md
JavaScript - Global Objects - Number - parseFloat - Syntax - Return value: A floating point number parsed from the given `string`. Or `NaN` when the first non-whitespace character cannot be converted to a number.
[ -0.3037146329879761, 0.09396892786026001, -0.34881243109703064, -0.6156142950057983, -0.125853031873703, -1.1224812269210815, 1.3529515266418457, 0.7536811232566833, -0.43644049763679504, 0.7207337021827698, -0.8774374127388, 0.5408430099487305, -0.7840345501899719, 0.44795992970466614, ...
javascript/reference/global_objects/number/parsefloat/index.md
JavaScript - Global Objects - Number - parseFloat - Examples - Number.parseFloat vs. parseFloat: This method has the same functionality as the global `parseFloat()` function: Example: Number.parseFloat === parseFloat; // true Its purpose is modularization of globals. See `parseFloat()` for more detail and examples...
[ -1.3208876848220825, -0.4564853012561798, -1.4208495616912842, -0.3445057272911072, -0.1772110015153885, -1.7924082279205322, 0.34959256649017334, 0.37078019976615906, -0.26239150762557983, 0.404215931892395, -0.6824413537979126, -0.5203419923782349, -0.23035606741905212, 0.405950546264648...
javascript/reference/global_objects/number/min_safe_integer/index.md
JavaScript - Global Objects - Number - MIN_SAFE_INTEGER: The `Number.MIN_SAFE_INTEGER` static data property represents the minimum safe integer in JavaScript, or -(253 - 1). To represent integers smaller than this, consider using `BigInt`. Example: const x = Number.MIN_SAFE_INTEGER - 1; const y = Number.MIN_SAFE_IN...
[ -1.45830500125885, -0.11403851211071014, -1.2608015537261963, 0.12418728321790695, 0.2077963650226593, -1.343784213066101, 0.13973194360733032, 0.24254578351974487, -0.5654243230819702, 0.5869446992874146, -0.9827144145965576, 0.47805309295654297, -0.8838011026382446, -1.110849380493164, ...
javascript/reference/global_objects/number/min_safe_integer/index.md
JavaScript - Global Objects - Number - MIN_SAFE_INTEGER - Value: `-9007199254740991` (-9,007,199,254,740,991, or about -9 quadrillion).
[ -0.6299619674682617, 0.4031265377998352, -1.0282607078552246, 0.011313559487462044, -0.743614912033081, -1.3960827589035034, -0.4398218095302582, -0.3868462145328522, -0.6212396621704102, -0.1590677797794342, -0.6597056984901428, -0.053308360278606415, -1.16497802734375, -0.787293732166290...
javascript/reference/global_objects/number/min_safe_integer/index.md
JavaScript - Global Objects - Number - MIN_SAFE_INTEGER - Description: Double precision floating point format only has 52 bits to represent the mantissa, so it can only safely represent integers between -(253 – 1) and 253 – 1. Safe in this context refers to the ability to represent integers exactly and to correctly co...
[ -0.786581814289093, -0.9078450798988342, -0.8543289303779602, -0.10527370870113373, 0.23595701158046722, -1.388644814491272, 0.18153232336044312, 0.5207381844520569, 0.1788550168275833, 0.7881741523742676, -0.7643870711326599, 1.3197001218795776, -0.12875743210315704, -0.13437311351299286,...
javascript/reference/global_objects/number/min_safe_integer/index.md
JavaScript - Global Objects - Number - MIN_SAFE_INTEGER - Examples - Using MIN_SAFE_INTEGER: Example: Number.MIN_SAFE_INTEGER; // -9007199254740991 -(2 ** 53 - 1); // -9007199254740991
[ -0.5834308862686157, 0.22441376745700836, -1.4818999767303467, -0.3455379903316498, -0.4048541784286499, -1.056937336921692, 0.20262321829795837, -0.0029833882581442595, -0.9422433972358704, 0.20975449681282043, -1.347495198249817, -0.14957520365715027, -1.1368311643600464, -0.885188043117...
javascript/reference/global_objects/number/max_safe_integer/index.md
JavaScript - Global Objects - Number - MAX_SAFE_INTEGER: The `Number.MAX_SAFE_INTEGER` static data property represents the maximum safe integer in JavaScript (253 – 1). For larger integers, consider using `BigInt`. Example: const x = Number.MAX_SAFE_INTEGER + 1; const y = Number.MAX_SAFE_INTEGER + 2; console.log(N...
[ -1.022245168685913, -0.6256242990493774, -1.4446772336959839, 0.3109924793243408, -0.16647064685821533, -1.1332675218582153, 0.031142069026827812, 0.17600557208061218, -0.1635505110025406, 0.24884316325187683, -0.7606251239776611, 0.8281095623970032, -0.7857833504676819, -1.145811319351196...
javascript/reference/global_objects/number/max_safe_integer/index.md
JavaScript - Global Objects - Number - MAX_SAFE_INTEGER - Value: `9007199254740991` (9,007,199,254,740,991, or 9 quadrillion).
[ -0.3914530575275421, 0.04589281603693962, -0.9939804077148438, 0.06497082859277725, -1.2135752439498901, -1.2047427892684937, -0.5010892152786255, -0.6026797294616699, -0.24768215417861938, -0.4014597237110138, -0.34719324111938477, -0.03455723077058792, -0.9373363852500916, -0.88916146755...
javascript/reference/global_objects/number/max_safe_integer/index.md
JavaScript - Global Objects - Number - MAX_SAFE_INTEGER - Description: Double precision floating point format only has 52 bits to represent the mantissa, so it can only safely represent integers between -(253 – 1) and 253 – 1. "Safe" in this context refers to the ability to represent integers exactly and to compare th...
[ -0.5105217695236206, -1.0259935855865479, -0.7578800916671753, -0.17135952413082123, 0.1110057532787323, -1.332507610321045, -0.038611311465501785, 0.7511786222457886, 0.3550715446472168, 0.6895719766616821, -0.49423539638519287, 1.342403769493103, 0.03316938877105713, -0.09309083968400955...
javascript/reference/global_objects/number/max_safe_integer/index.md
JavaScript - Global Objects - Number - MAX_SAFE_INTEGER - Examples - Return value of MAX_SAFE_INTEGER: Example: Number.MAX_SAFE_INTEGER; // 9007199254740991
[ -0.6752390265464783, -0.21105164289474487, -1.3825668096542358, -0.43024811148643494, -0.7916299700737, -0.6727079153060913, 0.6326907873153687, 0.5328618288040161, -0.6345549821853638, 0.12097045034170151, -0.6457165479660034, 0.3742241859436035, -0.4688863754272461, -0.8357667922973633, ...
javascript/reference/global_objects/number/max_safe_integer/index.md
JavaScript - Global Objects - Number - MAX_SAFE_INTEGER - Examples - Relationship between MAX_SAFE_INTEGER and EPSILON: `Number.EPSILON` is 2-52, while `MAX_SAFE_INTEGER` is 253 – 1 — both of them are derived from the width of the mantissa, which is 53 bits (with the highest bit always being 1). Multiplying them will ...
[ -0.1685062199831009, -0.7386261224746704, -0.832616925239563, 0.3957238793373108, 0.007546428125351667, -1.003564715385437, 0.5588393807411194, 0.2753685712814331, -0.040130604058504105, 0.4891314208507538, -0.6508519649505615, -0.05322807654738426, -0.8800485134124756, 0.14513535797595978...
javascript/reference/global_objects/number/toprecision/index.md
JavaScript - Global Objects - Number - toPrecision: The `toPrecision()` method of `Number` values returns a string representing this number to the specified number of significant digits. Example: function precise(x) { return x.toPrecision(4); } console.log(precise(123.456)); // Expected output: "123.5" console.l...
[ -1.3244545459747314, -0.13776272535324097, -1.1763858795166016, -0.19905893504619598, -0.36950960755348206, -1.8312718868255615, 0.3325917720794678, -0.23445028066635132, -0.6346185207366943, -0.07974214106798172, -0.7991024255752563, 0.48049235343933105, 0.15704216063022614, -0.1874148547...
javascript/reference/global_objects/number/toprecision/index.md
JavaScript - Global Objects - Number - toPrecision - Syntax: Example: toPrecision() toPrecision(precision)
[ -0.8019022941589355, 0.4061293303966522, -0.3880171775817871, -0.43647876381874084, -0.7748377919197083, -2.3655943870544434, 0.5964788198471069, 0.3035019636154175, -0.24027232825756073, -0.5854453444480896, -1.3919329643249512, 0.4669322967529297, -0.16224481165409088, 0.0032409043051302...
javascript/reference/global_objects/number/toprecision/index.md
JavaScript - Global Objects - Number - toPrecision - Syntax - Parameters: - `precision` (optional): An integer specifying the number of significant digits.
[ -0.4501001536846161, -0.28845053911209106, -0.9831036925315857, -0.08948135375976562, -0.7665331363677979, -1.5323619842529297, 0.70491623878479, -0.3005048930644989, 0.06009145826101303, -0.1226668655872345, -1.7871794700622559, 0.28240346908569336, -0.09169036149978638, 0.232028245925903...
javascript/reference/global_objects/number/toprecision/index.md
JavaScript - Global Objects - Number - toPrecision - Syntax - Return value: A string representing the given number, using the given number of significant digits. Scientific notation is used if the exponent is greater than or equal to `precision` or less than -6. Has the same behavior as `Number.prototype.toString()` i...
[ -1.4777851104736328, -0.20098894834518433, 0.19063344597816467, -0.41002196073532104, -0.7097169756889343, -1.9239917993545532, 0.6872990131378174, -0.13431043922901154, -0.32063835859298706, -0.0547846220433712, -1.3983112573623657, 1.2962613105773926, -0.49515634775161743, 0.353747338056...
javascript/reference/global_objects/number/toprecision/index.md
JavaScript - Global Objects - Number - toPrecision - Syntax - Exceptions: - `RangeError`: Thrown if `precision` is not between `1` and `100` (inclusive). - `TypeError`: Thrown if this method is invoked on an object that is not a `Number`.
[ -0.7831937074661255, -0.21263383328914642, -0.4536707401275635, 0.19795408844947815, -0.25532278418540955, -2.234043598175049, -0.34271448850631714, 0.2419816255569458, -0.4187370538711548, -0.2925991415977478, -0.9870021939277649, 0.30558469891548157, -0.39319881796836853, -0.575368225574...
javascript/reference/global_objects/number/toprecision/index.md
JavaScript - Global Objects - Number - toPrecision - Examples - Using `toPrecision`: Example: // This number has exponent 0, so it will never use exponential notation let num = 5.123456; console.log(num.toPrecision()); // '5.123456' console.log(num.toPrecision(5)); // '5.1235' console.log(num.toPrecision(2)); // '5....
[ 0.010491481982171535, 0.25321242213249207, -0.41809067130088806, 0.2664339244365692, 0.51756751537323, -1.36746084690094, 0.5216984152793884, 0.1630663126707077, -0.24111822247505188, -0.013102379627525806, -1.162624478340149, 0.10819365084171295, -0.6381120085716248, -0.14303059875965118,...
javascript/reference/global_objects/number/isnan/index.md
JavaScript - Global Objects - Number - isNaN: The `Number.isNaN()` static method determines whether the passed value is the number value `NaN`, and returns `false` if the input is not of the Number type. It is a more robust version of the original, global `isNaN()` function. Example: function typeOfNaN(x) { if (Nu...
[ -0.8307040333747864, -0.5423394441604614, -1.0510246753692627, 0.20433390140533447, -0.5178876519203186, -1.204204797744751, 0.9909663796424866, 0.4782264530658722, -0.7875711917877197, 0.7437153458595276, -1.1821706295013428, 0.023461289703845978, 0.0596407987177372, -0.11096972972154617,...
javascript/reference/global_objects/number/isnan/index.md
JavaScript - Global Objects - Number - isNaN - Syntax: Example: Number.isNaN(value)
[ 0.12207189947366714, 0.22524981200695038, -0.4034789204597473, -0.8362353444099426, -1.3255836963653564, -1.4619338512420654, 0.95823073387146, 1.0392283201217651, -0.6537391543388367, -0.3231196999549866, -1.3474379777908325, 0.38642221689224243, -0.3134026825428009, -0.34788283705711365,...
javascript/reference/global_objects/number/isnan/index.md
JavaScript - Global Objects - Number - isNaN - Syntax - Parameters: - `value`: The value to be tested for `NaN`.
[ 0.03565266728401184, 0.17244695127010345, -0.49195244908332825, -0.8745154142379761, -0.930873453617096, -1.4923334121704102, 1.0858510732650757, 0.6757746934890747, -0.41197866201400757, 0.10508451610803604, -1.3260037899017334, 0.3307771384716034, -0.12733697891235352, 0.3271564841270447...
javascript/reference/global_objects/number/isnan/index.md
JavaScript - Global Objects - Number - isNaN - Syntax - Return value: The boolean value `true` if the given value is a number with value `NaN`. Otherwise, `false`.
[ -0.9910808801651001, 0.19655098021030426, -0.20221185684204102, -0.3994944095611572, -1.1496832370758057, -1.8235477209091187, 1.2105282545089722, 0.6823443174362183, -0.8575969934463501, 0.0719372108578682, -1.6425997018814087, 0.2193496823310852, 0.2882458567619324, -0.2625369727611542, ...
javascript/reference/global_objects/number/isnan/index.md
JavaScript - Global Objects - Number - isNaN - Description: The function `Number.isNaN()` provides a convenient way to check for equality with `NaN`. Note that you cannot test for equality with `NaN` using either the `==` or `===` operators, because unlike all other value comparisons in JavaScript, these evaluate to `...
[ -0.8591957688331604, -0.6067553758621216, -0.6963421106338501, -0.020960217341780663, -0.3951532542705536, -0.9073262214660645, 1.4525632858276367, 0.2847079336643219, -0.9669415950775146, 0.46199366450309753, -1.3033708333969116, -0.6194411516189575, -0.318302720785141, -0.072978921234607...
javascript/reference/global_objects/number/isnan/index.md
JavaScript - Global Objects - Number - isNaN - Examples - Using isNaN(): Example: Number.isNaN(NaN); // true Number.isNaN(Number.NaN); // true Number.isNaN(0 / 0); // true Number.isNaN(37); // false
[ -0.8259332180023193, -0.011824237182736397, -0.16243664920330048, -0.5957382917404175, -1.144531488418579, -1.1983004808425903, 0.8883689641952515, 0.4574096202850342, -0.892142117023468, -0.11266659200191498, -1.7210978269577026, -0.025014489889144897, -0.09570667147636414, -0.45137789845...
javascript/reference/global_objects/number/isnan/index.md
JavaScript - Global Objects - Number - isNaN - Examples - Difference between Number.isNaN() and global isNaN(): `Number.isNaN()` doesn't attempt to convert the parameter to a number, so non-numbers always return `false`. The following are all `false`: Example: Number.isNaN("NaN"); Number.isNaN(undefined); Number.isN...
[ -0.8266110420227051, 0.1394018977880478, -0.8469356894493103, -0.6077277064323425, -0.861891508102417, -1.4234124422073364, 0.22089001536369324, -0.09024596959352493, -0.9127458333969116, 0.7875683903694153, -1.7981863021850586, -0.03005702793598175, -0.6718841791152954, 0.0611314848065376...
javascript/reference/global_objects/number/max_value/index.md
JavaScript - Global Objects - Number - MAX_VALUE: The `Number.MAX_VALUE` static data property represents the maximum numeric value representable in JavaScript. Example: function multiply(x, y) { if (x * y > Number.MAX_VALUE) { return "Process as Infinity"; } return x * y; } console.log(multiply(1.79769313...
[ -1.0561143159866333, -0.7045226693153381, -0.46155399084091187, 0.4615488052368164, -0.4677760899066925, -0.6242903470993042, 0.24974004924297333, 0.6987770795822144, 0.10648272931575775, 0.2859642505645752, 0.18407508730888367, 0.27369263768196106, 0.14362405240535736, -0.3294256627559662...
javascript/reference/global_objects/number/max_value/index.md
JavaScript - Global Objects - Number - MAX_VALUE - Value: 21024 - 2971, or approximately `1.7976931348623157E+308`.
[ -0.7796251773834229, -0.03982788324356079, -0.4457130432128906, -0.19704876840114594, -1.0651512145996094, -1.006413459777832, -0.5065655708312988, -0.11569777876138687, -0.5849987864494324, -0.039605215191841125, -0.4532341957092285, 0.9189726710319519, 0.02906954102218151, -0.43244862556...
javascript/reference/global_objects/number/max_value/index.md
JavaScript - Global Objects - Number - MAX_VALUE - Description: Values larger than `MAX_VALUE` are represented as `Infinity` and will lose their actual value. As mentioned in `Number.EPSILON`, the precision of numbers depends on their magnitude. Integers can only be represented precisely up to `Number.MAX_SAFE_INTEGER...
[ -0.8967912197113037, -0.41875940561294556, -0.8069742918014526, -0.020482154563069344, -0.8705871105194092, -1.3238496780395508, 0.23473036289215088, 0.02011582814157009, 0.18062180280685425, -0.19484767317771912, -0.4938428997993469, -0.033968985080718994, -0.1458643674850464, -0.48077484...
javascript/reference/global_objects/number/max_value/index.md
JavaScript - Global Objects - Number - MAX_VALUE - Examples - Using MAX_VALUE: The following code multiplies two numeric values. If the result is less than or equal to `MAX_VALUE`, the `func1` function is called; otherwise, the `func2` function is called. Example: if (num1 * num2 <= Number.MAX_VALUE) { func1(); } ...
[ -1.2413811683654785, 0.1573863923549652, -0.7886634469032288, 0.2719759941101074, -0.6287739872932434, -0.05037451535463333, 0.22581247985363007, 0.9007130265235901, -0.23799178004264832, -0.10986164212226868, -0.5408511757850647, -0.05155358836054802, -0.2777671217918396, -0.3274191915988...
javascript/reference/global_objects/number/epsilon/index.md
JavaScript - Global Objects - Number - EPSILON: The `Number.EPSILON` static data property represents the difference between 1 and the smallest floating point number greater than 1. Example: const result = Math.abs(0.2 - 0.3 + 0.1); console.log(result); // Expected output: 2.7755575615628914e-17 console.log(result ...
[ -1.0463556051254272, -1.1217857599258423, -0.843980610370636, -0.306904137134552, 0.14967960119247437, -2.374157190322876, -0.667270839214325, 0.5908219218254089, 0.5346583724021912, 0.24970364570617676, -0.5087667107582092, 1.1750116348266602, -0.5133635997772217, -0.45332062244415283, ...
javascript/reference/global_objects/number/epsilon/index.md
JavaScript - Global Objects - Number - EPSILON - Value: 2-52, or approximately `2.2204460492503130808472633361816E-16`.
[ -1.1355420351028442, -0.410613089799881, -0.33067500591278076, -0.3131612241268158, -0.1679924875497818, -2.16103458404541, -0.2382957935333252, -0.5705339312553406, -0.4951285719871521, -0.1866292506456375, -0.10416402667760849, 0.853728175163269, -0.2790045738220215, -0.21367935836315155...
javascript/reference/global_objects/number/epsilon/index.md
JavaScript - Global Objects - Number - EPSILON - Description: `Number.EPSILON` is the difference between 1 and the next greater number representable in the Number format, because double precision floating point format only has 52 bits to represent the mantissa, and the lowest bit has a significance of 2-52. Note that...
[ -0.7676851153373718, -1.0685945749282837, -0.6090695858001709, -0.35559722781181335, 0.3074815273284912, -2.493473768234253, -0.15779611468315125, 0.6162299513816833, 0.28095993399620056, 0.37439191341400146, -0.42524632811546326, 0.9583179354667664, -0.7686350345611572, 0.3979875445365906...
javascript/reference/global_objects/number/epsilon/index.md
JavaScript - Global Objects - Number - EPSILON - Examples - Testing equality: Any number encoding system occupying a finite number of bits, of whatever base you choose (e.g., decimal or binary), will necessarily be unable to represent all numbers exactly, because you are trying to represent an infinite number of point...
[ -0.030003776773810387, -0.0213013868778944, -0.2833018898963928, -0.44393104314804077, 0.7552315592765808, -1.1469416618347168, 0.3678848445415497, 0.08123384416103363, -0.5839306712150574, -0.14350536465644836, -1.152292013168335, 0.19318817555904388, -0.5948324203491211, 0.18388167023658...
javascript/reference/global_objects/number/nan/index.md
JavaScript - Global Objects - Number - NaN: The `Number.NaN` static data property represents Not-A-Number, which is equivalent to `NaN`. For more information about the behaviors of `NaN`, see the description for the global property. Example: function clean(x) { if (x === Number.NaN) { // Can never be true ...
[ -1.4625575542449951, -0.2627119719982147, -1.3328114748001099, -0.34379908442497253, -1.0035974979400635, -1.5737406015396118, 0.1891677975654602, 1.1835079193115234, -0.4528791904449463, 0.8613995909690857, -0.4800657033920288, 0.39897623658180237, -0.2332983911037445, -0.7582474946975708...
javascript/reference/global_objects/number/nan/index.md
JavaScript - Global Objects - Number - NaN - Value: The number value `NaN`.
[ -0.12499155849218369, 0.059211328625679016, -0.6454280018806458, -0.925870418548584, -1.2879916429519653, -1.1123883724212646, 0.7005727291107178, 0.4934060573577881, -0.7351982593536377, -0.38183674216270447, -0.9849067330360413, 0.059752002358436584, -0.5058982968330383, -0.4285988509654...
javascript/reference/global_objects/number/nan/index.md
JavaScript - Global Objects - Number - NaN - Description: Because `NaN` is a static property of `Number`, you always use it as `Number.NaN`, rather than as a property of a number value.
[ -0.8616372346878052, -0.20390133559703827, -0.7042867541313171, -0.5899980664253235, -0.7167210578918457, -1.7409250736236572, 0.7122612595558167, 0.9012349843978882, -0.06466864794492722, 0.41292232275009155, -1.1594164371490479, 0.42395055294036865, -0.3340655565261841, -0.22838187217712...
javascript/reference/global_objects/number/nan/index.md
JavaScript - Global Objects - Number - NaN - Examples - Checking whether values are numeric: Example: function sanitize(x) { if (isNaN(x)) { return Number.NaN; } return x; }
[ -1.0999524593353271, -0.17392094433307648, -0.5188641548156738, -0.7486178278923035, -1.0966390371322632, -1.200359582901001, 1.1935887336730957, 0.6015745997428894, -0.6458072662353516, 0.6291648149490356, -0.9618076086044312, -0.10297128558158875, -0.04102131724357605, -0.736208915710449...
javascript/reference/global_objects/number/issafeinteger/index.md
JavaScript - Global Objects - Number - isSafeInteger: The `Number.isSafeInteger()` static method determines whether the provided value is a number that is a safe integer. Example: function warn(x) { if (Number.isSafeInteger(x)) { return "Precision safe."; } return "Precision may be lost!"; } console.log(w...
[ -0.6972025632858276, -0.11632204055786133, -1.3953965902328491, -0.42255088686943054, -0.28899142146110535, -2.111081600189209, 0.8981138467788696, 0.5308851003646851, -0.4619389772415161, 0.8850871324539185, -1.31545090675354, -0.08815594017505646, -0.20150841772556305, -0.857923269271850...
javascript/reference/global_objects/number/issafeinteger/index.md
JavaScript - Global Objects - Number - isSafeInteger - Syntax: Example: Number.isSafeInteger(testValue)
[ -0.12337590754032135, 0.01206211932003498, -0.5767084956169128, -0.39556023478507996, -0.500389039516449, -2.2068490982055664, 0.9910265803337097, 0.8720241785049438, -0.4657455086708069, 0.09873325377702713, -1.211205244064331, 0.19260282814502716, -0.02215239591896534, -1.084203839302063...
javascript/reference/global_objects/number/issafeinteger/index.md
JavaScript - Global Objects - Number - isSafeInteger - Syntax - Parameters: - `testValue`: The value to be tested for being a safe integer.
[ 0.048674046993255615, 0.15131686627864838, -0.6958584189414978, -0.3979942500591278, 0.0278013925999403, -1.7884628772735596, 0.7721378803253174, 0.6050388813018799, 0.025591449812054634, 0.012361322529613972, -1.3157010078430176, 0.23537954688072205, -0.25858572125434875, -0.6365263462066...
javascript/reference/global_objects/number/issafeinteger/index.md
JavaScript - Global Objects - Number - isSafeInteger - Syntax - Return value: The boolean value `true` if the given value is a number that is a safe integer. Otherwise `false`.
[ -0.2691415250301361, 0.24889396131038666, -0.8789379596710205, -0.00873356219381094, -0.3755289614200592, -2.16471004486084, 1.2868064641952515, 0.823921799659729, -0.38803380727767944, -0.09576278924942017, -1.4978913068771362, 0.34715718030929565, 0.29716184735298157, -1.0183496475219727...
javascript/reference/global_objects/number/issafeinteger/index.md
JavaScript - Global Objects - Number - isSafeInteger - Description: The safe integers consist of all integers from -(253 - 1) to 253 - 1, inclusive (±9,007,199,254,740,991). A safe integer is an integer that: - can be exactly represented as an IEEE-754 double precision number, and - whose IEEE-754 representation cann...
[ -0.33969709277153015, 0.49415960907936096, -1.1969857215881348, -0.27416107058525085, -0.20513072609901428, -1.991471767425537, 0.7532562017440796, 0.05167200043797493, -0.3581557869911194, 0.46365097165107727, -0.22813643515110016, 0.9407936334609985, -0.24870289862155914, -0.956741571426...
javascript/reference/global_objects/number/issafeinteger/index.md
JavaScript - Global Objects - Number - isSafeInteger - Examples - Using isSafeInteger(): Example: Number.isSafeInteger(3); // true Number.isSafeInteger(2 ** 53); // false Number.isSafeInteger(2 ** 53 - 1); // true Number.isSafeInteger(NaN); // false Number.isSafeInteger(Infinity); // false Number.isSafeInteger("3"); ...
[ -0.75190669298172, -0.2912718951702118, -0.9350581169128418, -0.6901280879974365, -0.4305771589279175, -2.2627880573272705, 1.1309502124786377, 0.004277511034160852, -0.792622983455658, 0.4594273269176483, -1.426340103149414, -0.005672252271324396, 0.00005739652260672301, -0.90615373849868...
javascript/reference/global_objects/number/positive_infinity/index.md
JavaScript - Global Objects - Number - POSITIVE_INFINITY: The `Number.POSITIVE_INFINITY` static data property represents the positive Infinity value. Example: function checkNumber(bigNumber) { if (bigNumber === Number.POSITIVE_INFINITY) { return "Process number as Infinity"; } return bigNumber; } console....
[ -1.846950888633728, -0.7296086549758911, -0.8540759086608887, 0.03077629953622818, -0.2811702787876129, -1.5929577350616455, -0.35762402415275574, 0.17547951638698578, 0.2408408224582672, 0.42290928959846497, -0.8551918864250183, 0.003818363882601261, 0.5216749906539917, -0.155499875545501...
javascript/reference/global_objects/number/positive_infinity/index.md
JavaScript - Global Objects - Number - POSITIVE_INFINITY - Value: The same as the value of the global `Infinity` property.
[ -1.1082834005355835, -0.4862360656261444, -0.3868251442909241, -0.12616419792175293, -0.6723006963729858, -2.2720484733581543, 0.5664327144622803, 0.7091936469078064, 0.613713264465332, -0.40527471899986267, -1.1016789674758911, -0.03101523406803608, 0.10904277116060257, -0.108117535710334...
javascript/reference/global_objects/number/positive_infinity/index.md
JavaScript - Global Objects - Number - POSITIVE_INFINITY - Description: The `Number.POSITIVE_INFINITY` value behaves slightly differently than mathematical infinity: - Any positive value, including `POSITIVE_INFINITY`, multiplied by `POSITIVE_INFINITY` is `POSITIVE_INFINITY`. - Any negative value, including `NEGATIVE...
[ -1.1268318891525269, -0.12081454694271088, -0.35342147946357727, 0.35593339800834656, -0.27878543734550476, -1.0732827186584473, 0.5441772937774658, 0.8804296255111694, 0.029606875032186508, 0.3590906262397766, -1.3623909950256348, -0.1547473967075348, -0.5748534798622131, 0.00608775485306...
javascript/reference/global_objects/number/positive_infinity/index.md
JavaScript - Global Objects - Number - POSITIVE_INFINITY - Examples - Using POSITIVE_INFINITY: In the following example, the variable `bigNumber` is assigned a value that is larger than the maximum value. When the `if` statement executes, `bigNumber` has the value `Infinity`, so `bigNumber` is set to a more manageable...
[ -1.5213381052017212, -0.2554381787776947, -0.7602540254592896, 0.2751787304878235, -0.5050902962684631, -1.6009889841079712, 0.623115599155426, 0.16643910109996796, -0.06917960196733475, 0.2526208460330963, -0.9151743054389954, -0.13148874044418335, -0.21993011236190796, -0.027092358097434...
javascript/reference/global_objects/number/parseint/index.md
JavaScript - Global Objects - Number - parseInt: The `Number.parseInt()` static method parses a string argument and returns an integer of the specified radix or base. Example: function roughScale(x, base) { const parsed = Number.parseInt(x, base); if (Number.isNaN(parsed)) { return 0; } return parsed * 1...
[ -0.6411046385765076, -0.16628792881965637, -1.1427371501922607, -0.222026988863945, 0.2661937475204468, -0.941660463809967, 0.6584348082542419, 0.26870712637901306, -0.30147889256477356, 0.4524663984775543, -1.0688068866729736, 0.6510679125785828, -0.6110233068466187, -0.19149887561798096,...
javascript/reference/global_objects/number/parseint/index.md
JavaScript - Global Objects - Number - parseInt - Syntax: Example: Number.parseInt(string) Number.parseInt(string, radix)
[ -0.45481759309768677, 0.38203951716423035, -0.2693050801753998, -0.11389068514108658, -0.4261215925216675, -2.184260606765747, 0.5003409385681152, 0.09457841515541077, -0.2140662670135498, -0.5689256191253662, -0.7734002470970154, -0.21131037175655365, -0.9656756520271301, 0.04590332880616...
javascript/reference/global_objects/number/parseint/index.md
JavaScript - Global Objects - Number - parseInt - Syntax - Parameters: - `string`: The value to parse, coerced to a string. Leading whitespace in this argument is ignored. - `radix` (optional): An integer between `2` and `36` that represents the radix (the base in mathematical numeral systems) of the `string`. If `rad...
[ -0.15558737516403198, 0.15329204499721527, -0.7574223279953003, -0.5124689936637878, 0.000028850059607066214, -1.7417317628860474, 1.0477312803268433, 0.03148636966943741, 0.6332411766052246, -0.31307363510131836, -1.0523173809051514, 0.23683501780033112, -1.3761533498764038, 0.17109306156...
javascript/reference/global_objects/number/parseint/index.md
JavaScript - Global Objects - Number - parseInt - Syntax - Return value: An integer parsed from the given `string`. If the `radix` is smaller than `2` or bigger than `36`, or the first non-whitespace character cannot be converted to a number, `NaN` is returned.
[ -0.23238888382911682, 0.08207574486732483, 0.18933120369911194, -0.37038183212280273, -0.41271844506263733, -1.205463171005249, 0.9355791211128235, 0.24273160099983215, -0.6180271506309509, 0.4759470224380493, -1.1895883083343506, 0.33992090821266174, -0.9873828291893005, -0.05897795036435...
javascript/reference/global_objects/number/parseint/index.md
JavaScript - Global Objects - Number - parseInt - Examples - Number.parseInt vs. parseInt: This method has the same functionality as the global `parseInt()` function: Example: Number.parseInt === parseInt; // true Its purpose is modularization of globals. Please see `parseInt()` for more detail and examples.
[ -1.0770885944366455, -0.7089932560920715, -0.8145430088043213, 0.37880948185920715, -0.06745374202728271, -2.2243125438690186, -0.16997742652893066, 0.2628926932811737, -0.1661340743303299, 0.3717542886734009, -1.3576933145523071, -0.2459629625082016, -0.1334255188703537, 0.023177176713943...
javascript/reference/global_objects/weakref/index.md
JavaScript - Global Objects - WeakRef: A `WeakRef` object lets you hold a weak reference to another object, without preventing that object from getting garbage-collected.
[ -0.8764292597770691, 0.07809476554393768, -0.8056461215019226, -0.09216391295194626, -0.22638170421123505, -2.1739308834075928, 1.683571457862854, 1.2483268976211548, 0.0918329581618309, -0.00247144210152328, -1.385565996170044, 0.21978265047073364, -0.17949701845645905, 0.9495615363121033...
javascript/reference/global_objects/weakref/index.md
JavaScript - Global Objects - WeakRef - Description: A `WeakRef` object contains a weak reference to an object, which is called its target or referent. A weak reference to an object is a reference that does not prevent the object from being reclaimed by the garbage collector. In contrast, a normal (or strong) referenc...
[ -0.6742687821388245, 0.12194004654884338, -0.7046682238578796, -0.20530164241790771, -0.06100618839263916, -2.219820976257324, 1.7189162969589233, 0.902113676071167, -0.11666768044233322, 0.516595184803009, -0.7565904259681702, 0.06938371807336807, -0.34937766194343567, 0.6394548416137695,...
javascript/reference/global_objects/weakref/index.md
JavaScript - Global Objects - WeakRef - Description - Avoid where possible: Correct use of `WeakRef` takes careful thought, and it's best avoided if possible. It's also important to avoid relying on any specific behaviors not guaranteed by the specification. When, how, and whether garbage collection occurs is down to ...
[ -0.34193113446235657, -0.12320641428232193, -0.9793482422828674, 0.6117461919784546, 0.4527238607406616, -1.8739866018295288, 0.13254770636558533, -0.08278730511665344, -0.39111489057540894, 0.7220785021781921, -0.3446599245071411, 0.30264759063720703, -0.4115777611732483, 0.42320489883422...
javascript/reference/global_objects/weakref/index.md
JavaScript - Global Objects - WeakRef - Description - Notes on WeakRefs: - If your code has just created a `WeakRef` for a target object, or has gotten a target object from a `WeakRef`'s `deref` method, that target object will not be reclaimed until the end of the current JavaScript job (including any promise reaction...
[ 0.7334805727005005, 0.39614376425743103, -0.6873950362205505, 0.648016631603241, 1.0845972299575806, -1.480267882347107, -0.011279330588877201, 0.7562597990036011, -0.6233037710189819, -0.23373596370220184, -0.6658669114112854, 0.8191887140274048, 0.12967929244041443, 0.8518195748329163, ...
javascript/reference/global_objects/weakref/index.md
JavaScript - Global Objects - WeakRef - Constructor: - `WeakRef()`: Creates a new `WeakRef` object.
[ -1.1770144701004028, 0.11920075118541718, -0.6788910627365112, -0.30046772956848145, 0.007559075020253658, -1.6876418590545654, 0.7266246676445007, 1.7243578433990479, -0.14332562685012817, 0.25349709391593933, -1.0934362411499023, -0.3399725556373596, -0.06472646445035934, 0.9596794247627...