Loading...
By continuing to use the platform, you accept the terms of the Privacy Policy and the use of cookies.
Type the function so that key can only be a key of obj.
const getObjField = (obj, key) => { return obj[key] }
Run your code to see results.
Click the Run button above