public/subjects/get
xpetit def316d0f3
Reformat markdown (with prettier)
2021-04-27 21:04:54 +02:00
..
README.md Reformat markdown (with prettier) 2021-04-27 21:04:54 +02:00

README.md

Get

Instructions

Create the get function. It takes 2 arguments:

  • src an object
  • path a string

And returns the value at the given string path.

Example:

const src = { nested: { key: 'peekaboo' } }
const path = 'nested.key'
get(src, path) // -> 'peekaboo'