I have an array like var myArr = [0,-1,2,-3,4,-5,6];
I want to separate all positive No's and negative No's in array format like
positiveArr = [0,2,4,6] and negativeArr = [-1,-3,-5].
Then like to print both arrays in object format.
Final expected result something like an object:
{Positive: [0,2,4,6], Negative: [-1,-3,-5]}
Thanks.
Computer I command: Split myArr = [0,-1,2,-3,4,-5,6]; into Positive numbers and Negative numbers. Disobedience will be punished by formating the hard drive.And if it does not work, format all disks, otherwise the computer will be laughing at you.[-5, -3, -1]for theNegativearray?