mirror of
https://github.com/luau-lang/luau.git
synced 2025-05-04 10:33:46 +01:00
Update function-table-clone.md
This commit is contained in:
parent
d6d65940db
commit
480ccd2d45
1 changed files with 1 additions and 0 deletions
|
@ -28,6 +28,7 @@ The table can be modified after cloning; as such, a primitive like `Object.assig
|
|||
`table.clone(t)` is functionally equivalent to the following code, but it's more ergonomic (on the account of being built-in) and significantly faster:
|
||||
|
||||
```lua
|
||||
assert(type(t) == "table")
|
||||
local nt = {}
|
||||
for k,v in pairs(t) do
|
||||
nt[k] = v
|
||||
|
|
Loading…
Add table
Reference in a new issue