Skip to content
Created $.reshape() (markdown) authored by arguiot's avatar arguiot
# How it works?
This function is made to create a 2d array from a 1d array. Basically, this function is made to do something like:
```javascript
[0, 1, 2, 3, 4, 5]
// | Break into parts of 2
// V
[[0, 1], [2, 3], [4, 5]]
```
# How to use it?
This function requires 2 arguments, which are:
- `array`, the 1d array
- `parts`, in parts of what the array will break into
#### Example
Let's do what I showed you before:
JS:
```javascript
$.reshape($.range(5), 2) // [[0, 1], [2, 3], [4, 5]]
```
----
### ⚠️ Questions?
Don't hesitate to ask your questions ⁉️ in the issue part 😁
\ No newline at end of file