can-observe
Version:
Like can.Map, but without the .attr method.
28 lines (17 loc) • 611 B
Markdown
import { observe } from "can/everything";
const names = new observe.Array(['Alice', 'Bob']);
names.unshift('Chris');
console.log(names); //-> ['Chris', 'Alice', 'Bob']
```
## Events
`unshift` causes _length_ events to be fired.
`unshift` adds elements onto the start of an observe array.
```js