mirror of
https://github.com/hanzoai/babel.git
synced 2026-09-24 16:56:45 +00:00
11 lines
149 B
JavaScript
11 lines
149 B
JavaScript
const foo = {
|
|
1: "a",
|
|
2: "b",
|
|
3: "c",
|
|
};
|
|
|
|
const { [1]: bar, ...rest } = foo;
|
|
|
|
expect(bar).toBe("a");
|
|
expect(rest).toEqual({ 2: "b", 3: "c" });
|