Does Groovy have object destructuring with multiple assignments like Javascript:
let options = {
title: "Menu",
width: 100,
height: 200
};
let {title, width, height} = options;
alert(title); // Menu
alert(width); // 100
alert(height); // 200
Groovy doesn't have JavaScript's object destructuring... It only has index based destructuring
https://groovy-lang.org/semantics.html#_object_destructuring_with_multiple_assignment
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With