[pshaiCmd] ArrayRemove

0 728 Views No Comments 3 years ago
  • Simple custom command to remove a cell from an array.

    Usage testample:

    local testArr1 = {'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k'}
    local testArr2 = {1, 2, 3, 4, 5, 6, 7, 8, 9}
    
    local result1 = CC_ArrayRemove(testArr1, 4)
    local result2 = CC_ArrayRemove(testArr2, 4)
    local result3 = CC_ArrayRemove(testArr1, 1)
    local result4 = CC_ArrayRemove(testArr2, #testArr2)
    
    Log(result1) -- missing 'd'
    Log(result2) -- missing '4'
    Log(result3) -- missing 'a'
    Log(result4) -- missing '9'
    HaasScript Code
    Sign in or Register to download for free
  • Mandala Trading Competition Promotion Type: contest Expires: June 9, 2023 Exclusive
    Trading volume competition, win up to $10,000 USDT and bounties.
  • Earn Up to 200 BMEX Tokens Promotion Type: contest Expires: March 31, 2023
    15 BMEX @ $20,000, 25 BMEX @ $50,000, 50 [email protected] $200,000, 100 BMEX @ $400,000, 200 BMEX @ $600,000 in monthly derivatives volume
Login or Register to Comment

Unlock your crypto trading potential

Create a free account and enjoy everything we have to offer.

Join for Free