Question: Write a JavaScript function that takes an array A of integer values and returns an array B containing all elements of A that are either

Write a JavaScript function that takes an array A of integer values and returns an array B containing all elements of A that are either a multiple of 3 or 5. You must use the filter method to implement your function. Test your program on the array A = [12, 5, 8, 130, 44] and output the resulting array to the terminal window. Source File Name: filter.js.

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!