aral, 23 days ago to javascript Just wrote a note about a little gotcha with default values for destructured properties of parameter objects in JavaScript that has gotten me a few times: https://codeberg.org/aral/gists/src/branch/main/default-values-for-destructured-properties-of-parameter-objects-in-javascript.md #JavaScript #destructuring #defaults #parameterObjects #web #dev
Just wrote a note about a little gotcha with default values for destructured properties of parameter objects in JavaScript that has gotten me a few times:
https://codeberg.org/aral/gists/src/branch/main/default-values-for-destructured-properties-of-parameter-objects-in-javascript.md
#JavaScript #destructuring #defaults #parameterObjects #web #dev
schizanon, 3 months ago to javascript I'm sure there's some technical reason it can't be done, but I really want to be able to wrap destructured variables with functions. instead of: const { prop, otherProp } = object; const propAsNumber = parseInt(prop); I want to do: const { parseInt(prop), otherProp } = object; #javaScript #webDev #frontend #backend #fullstack #nodejs #ecmascript #destructuring #es6
I'm sure there's some technical reason it can't be done, but I really want to be able to wrap destructured variables with functions.
instead of:
const { prop, otherProp } = object; const propAsNumber = parseInt(prop);
I want to do:
const { parseInt(prop), otherProp } = object;
#javaScript #webDev #frontend #backend #fullstack #nodejs #ecmascript #destructuring #es6