--- id: 5d79253760fca25ccbbd8990 title: Part 97 challengeType: 0 dashedName: part-97 --- # --description-- The array destructuring syntax can be used to extract values from arrays: ```js const [x, y] = [1, 2]; // in variables const fn = ([x, y]) => x + y // in functions ``` Use this syntax to define a function `random` in `spreadsheetFunctions` which takes the array `[x, y]` and returns `x`. # --hints-- See description above for instructions. ```js assert( /["']?random["']?:\(\[x,y\]\)=>x/.test(code.replace(/\s/g, '')) && spreadsheetFunctions['random']([1, 2]) === 1 ); ``` # --seed-- ## --before-user-code-- ```html Spreadsheet
``` ## --after-user-code-- ```html ``` ## --seed-contents-- ```html ``` # --solutions-- ```html ```