diff --git a/docs/ko/reference/compat/object/get.md b/docs/ko/reference/compat/object/get.md index 2435a8b7..15b3d050 100644 --- a/docs/ko/reference/compat/object/get.md +++ b/docs/ko/reference/compat/object/get.md @@ -52,13 +52,16 @@ function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaul ### ์˜ˆ์‹œ ```typescript +import { get } from 'es-toolkit/compat'; + const obj = { a: { b: 4 } -} -console.log(obj, 'a.b') // 4 -console.log(obj, ['a', 'b']) // 4 -console.log(obj, ['a', 'c']) // undefined -console.log(obj, ['a', 'c'], null) // null +}; + +get(obj, 'a.b'); // 4 +get(obj, ['a', 'b']); // 4 +get(obj, ['a', 'c']); // undefined +get(obj, ['a', 'c'], null); // null ``` \ No newline at end of file diff --git a/docs/reference/compat/object/get.md b/docs/reference/compat/object/get.md index 2531a01f..746f7155 100644 --- a/docs/reference/compat/object/get.md +++ b/docs/reference/compat/object/get.md @@ -52,13 +52,16 @@ function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaul ### Examples ```typescript +import { get } from 'es-toolkit/compat'; + const obj = { a: { b: 4 } -} -console.log(obj, 'a.b') // 4 -console.log(obj, ['a', 'b']) // 4 -console.log(obj, ['a', 'c']) // undefined -console.log(obj, ['a', 'c'], null) // null +}; + +get(obj, 'a.b'); // 4 +get(obj, ['a', 'b']); // 4 +get(obj, ['a', 'c']); // undefined +get(obj, ['a', 'c'], null); // null ``` \ No newline at end of file diff --git a/docs/zh_hans/reference/compat/object/get.md b/docs/zh_hans/reference/compat/object/get.md index 51db93fa..6cf341ef 100644 --- a/docs/zh_hans/reference/compat/object/get.md +++ b/docs/zh_hans/reference/compat/object/get.md @@ -52,13 +52,16 @@ function get(object: unknown, path: PropertyKey | readonly PropertyKey[], defaul ### ็คบไพ‹ ```typescript +import { get } from 'es-toolkit/compat'; + const obj = { a: { b: 4 } -} -console.log(obj, 'a.b') // 4 -console.log(obj, ['a', 'b']) // 4 -console.log(obj, ['a', 'c']) // undefined -console.log(obj, ['a', 'c'], null) // null +}; + +get(obj, 'a.b'); // 4 +get(obj, ['a', 'b']); // 4 +get(obj, ['a', 'c']); // undefined +get(obj, ['a', 'c'], null); // null ``` \ No newline at end of file