Question: Write a JavaScript code to sort the data into positive and negative numbers. The final data should be stored as an object containing arrays assigned

Write a JavaScript code to sort the data into positive and negative numbers. The final data should be stored as an object containing arrays assigned to its properties.

let data = [123, 24, 73, -23, -90, 28, -934, 811, 20, -8, 62, 15, -21, 99, -878, 55, 153, 1, -921, -445, -3, 16]

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Databases Questions!