-
Notifications
You must be signed in to change notification settings - Fork 57
$.reshape()
Arthur Guiot edited this page Jul 12, 2017
·
1 revision
This function is made to create a 2d array from a 1d array. Basically, this function is made to do something like:
[0, 1, 2, 3, 4, 5]
// | Break into parts of 2
// V
[[0, 1], [2, 3], [4, 5]]
This function requires 2 arguments, which are:
-
array
, the 1d array -
parts
, in parts of what the array will break into
Let's do what I showed you before:
JS:
$.reshape($.range(5), 2) // [[0, 1], [2, 3], [4, 5]]
Don't hesitate to ask your questions
- Home
- The Core Languages
- Getting Started: Installation
- The Basics (
$.var()
+$.target()
) - Developing for DisplayJS
-
$.select()
- Text related
- If...else
$.xss()
$.repeat()
$.custom()
$.live()
$.load()
$.on()
$.onEvent()
$.ready()
- Scroll API
$.all()
$.clone()
$.is()
$.valEmpty()
$.remove()
$.show()
&$.hide()
$.ajax()
- Class Related
$.css()
$.getStyle()
- Fade effects
$.extend()
$.dynamic()
$.parent()
- Elements-Nodes
$.component()
$.time_ago()
$.copy()
$.then()
$.sleep()
$.getProp()