Array.except()

From ZCubes Wiki
Jump to navigation Jump to search


Using except() function, you can exclude few elements from an original array, by mentioning in the arguments section, to get a new array as output.

Examples

1.

a=1..5@SIN
a.except(SIN(4))

-->Displays all the SIN VALUES FROM 1 to 5 as output, excluding the SIN(4) value.
0.8414709848078965 0.9092974268256817 0.1411200080598672 -0.9589242746631385


2.

a=["Mango","Grapes",67,8,"Orange","Banana",100]
a.except("Grapes",67,100)

-->Displays output as: Mango 8 Orange Banana


See Also