Skip to main content
2 votes
1 answer
184 views

In the following JavaScript, does the object destructuring that follows the creation of target create a new (temporary) object that has to be garbage collected? In other words, are there two objects ...
user3163495's user avatar
  • 4,036
-1 votes
1 answer
46 views

I was wondering if it's possible to have access to entire object inside if/for, but still be able to destructure individual props {#if object_var} {const {prop_var} = object_var}. <- doesn't work,...
Alex's user avatar
  • 66.7k
-1 votes
1 answer
52 views

I want to reduce my javascript code. I have: let c = document.querySelectorAll(".check"), l = document.querySelectorAll(".label"); I want to have, for example: let [c, l] = ...
sae67's user avatar
  • 11
3 votes
3 answers
331 views

If I have a table with known properties, but where the order of the properties is potentially unknown: local person = { name = 'James', age = 30, } can I reliably destructure it: local name, ...
user avatar
2 votes
1 answer
526 views

I have a problem in TypeScript with an IteratorResult destructuring. I'm doing a simple object destructuring and I'm getting an array destructuring error. This is the code that is throwing the ...
Josías Genem's user avatar
1 vote
1 answer
29 views

I am building a simple app that displays an index of comments, allows posting of new comments, and editing+deleting of existing comments. I do this following Colt Steele's course section 371. At a ...
Eyas's user avatar
  • 11
0 votes
1 answer
129 views

Without using index I was able to destructure the first and second elements of an Array of Arrays like so: [ [ 1, 2 ], [ 3, 4 ] ].each do |first, second| puts second end #=> 2 #=> 4 I then ...
Joshua Pinter's user avatar
2 votes
1 answer
59 views

Given the below JSBIN why A is undefined? https://jsbin.com/bisomevivu/edit?html,js,console,output HTML: <!DOCTYPE html> <html> <head> <meta charset="utf-8"> <...
vladimir_1969_2's user avatar
1 vote
1 answer
151 views

I am going through the language tour and, coming from a mostly Javascript background, I'm having trouble understanding how to destructure this record. (int, String, {String b, String c}) rec = (7, c:&...
I wrestled a bear once.'s user avatar
2 votes
9 answers
559 views

I have an array of objcets. With reduce method after looping i want to receive two seperate arrays. Now, i am doing this way. const dogs = [ { weight: 22, curFood: 250, owners: ['Alice', 'Bob'] }, ...
Zuka Kharati's user avatar
3 votes
3 answers
1k views

Is there a way to tell Serilog not to serialize null-valued properties of objects logged using the @ (destructuring) operator? I found a couple of posts on the topic (actually, I found more, but these ...
Alek Davis's user avatar
  • 10.8k
0 votes
1 answer
146 views

I am trying to pass two objects weights(list with integer value) and progressDatas(list with string value) from the server side to the client side. In the client side I am stuck at how to render the ...
JOSEPH BHARATH's user avatar
1 vote
0 answers
31 views

I am building a react native application to display nearby hospitals. The error is at AppMapView & ListView component const [placeList, setPlaceList] = useState([]); ere, placeList is not empty. ...
Mayank Thakur's user avatar
-1 votes
2 answers
125 views

I want to get data from DB based on the boolean flag. async function main() { let promises = []; if (false) { promises.push(Promise.resolve("highlights from DB")); } if (true) {...
Ashutosh's user avatar
  • 1,105
3 votes
4 answers
837 views

I have a React application (although the question is not really about React), with typescript. In a functional component (whose consumer I want to be able to pass OR styles OR a class, but not both), ...
César Rodriguez's user avatar

15 30 50 per page
1
2 3 4 5
93