-
Notifications
You must be signed in to change notification settings - Fork 57
$.rmFromArray()
Arthur Guiot edited this page Sep 27, 2017
·
3 revisions
This function is made to remove items in an array if the condition you defined is true. So, if I want to remove every even number in this list [0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
, that's the result I would want:
[0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10]
// |
// v
[1, 3, 5, 7, 9]
Let's reproduce what I just showed you.
JS:
$.rmFromArray($.range(10), x => x % 2 == 0); // [1, 3, 5, 7, 9]
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()