Number functions and other functions issue [duplicate] - javascript

This question already has answers here:
Calling the toFixed method on a number literal [duplicate]
(3 answers)
Why can't I access a property of an integer with a single dot?
(5 answers)
Closed 5 years ago.
Can someone logicaly explain why fallowing function return error
50.toFixed(2);
and this not
(50).toFixed(2);
Same happening with other similar number functions

Related

using console?.log(69) instead console.log(69) not getting any error why? [duplicate]

This question already has answers here:
Question mark after parameter as in obj.val?.prop [duplicate]
(3 answers)
Null-safe property access (and conditional assignment) in ES6/2015
(11 answers)
Closed 1 year ago.
After running console.log(69) and console?.log(69) getting 69 as output. What is use of '?' ?

i am unable to understand this sorting function, it is working fine and return random values [duplicate]

This question already has answers here:
Sorting an Array in Random Order
(7 answers)
Is it correct to use JavaScript Array.sort() method for shuffling?
(13 answers)
Closed 3 years ago.
this sorting function using 0.5 before Math.random function when it return i am unable to understand about this value, how this value is here?
array.sort(()=>{
return 0.5 - Math.random()
});

What is "()=>{}" in js? [duplicate]

This question already has answers here:
What's the meaning of "=>" (an arrow formed from equals & greater than) in JavaScript?
(14 answers)
Closed 5 years ago.
I searched for
"()=>{} in js"
on Google
But it's not displaying relative results
What is it?
=> is a shortcut for an anonymous function. So that's just a function that does nothing. equivalent to:
function () { }

Value from GET parameters in javascript [duplicate]

This question already has answers here:
Get the values from the "GET" parameters (JavaScript) [duplicate]
(63 answers)
How can I get query string values in JavaScript?
(73 answers)
Closed 6 years ago.
I have the link like below:
http://localhost/Matrix/details.php?imgi=4
But i want to get the value of imgi in javascript i.e 4. Any solutions?

node-hashtable - how to get set of all keys? [duplicate]

This question already has answers here:
How to list the properties of a JavaScript object?
(18 answers)
Closed 8 years ago.
In Java it's called the keyset.
https://www.npmjs.org/package/node-hashtable
how come there is no method to return a list of all the keys?
Looking at the source there seems to be a method indexes which returna a list of the keys.

Categories

Resources