python (65.2k questions)
javascript (44.3k questions)
reactjs (22.7k questions)
java (20.8k questions)
c# (17.4k questions)
html (16.3k questions)
r (13.7k questions)
android (13k questions)
Array.filter not working as expected, I am getting Null Array in the end
const normArray = [1, 2, 3, 4, 5]; //array
const mapArray = normArray.map((num)=>{
return num * 5;
}) //mapping
const filterArray = mapArray...

DevABDee
Votes: 0
Answers: 1
returning a value if a String includes the key
I have a JS Object Literal (logGroupMap) containing alarm names as keys, and their log groups as values. Alarm names are passed in with consistent names of varying length but with generated character...
dulongj
Votes: 0
Answers: 1
How does memory leak happen from arrow functions
I have two methods below:
function foobar() {
const viewState = getViewState();
return () => { use(viewState); }
}
function foobar() {
return (viewState) => { use(viewState); }
}
Can ...
flyingbee
Votes: 0
Answers: 0
Can anyone explain "items.map((item) =>item.id === id ? { ...item, checked: !item.checked } : item"?
Can anyone explain "items.map((item) =>item.id === id ? { ...item, checked: !item.checked } : item"?
I just came up with this kind of example, don't know if it's correct.(if "onChang...
Junior
Votes: 0
Answers: 2