I\'ve determined that a Java ArrayList.add is similar to a JavaScript Array.push
I\'m stuck on finding ArrayList functions sim
Underscore-java library contains methods push(values), pop(), shift() and unshift(values).
Code example:
import com.github.underscore.U:
List strings = Arrays.asList("one", "two", " three");
List newStrings = U.push(strings, "four", "five");
// ["one", " two", "three", " four", "five"]
String newPopString = U.pop(strings).fst();
// " three"
String newShiftString = U.shift(strings).fst();
// "one"
List newUnshiftStrings = U.unshift(strings, "four", "five");
// ["four", " five", "one", " two", "three"]