get array object in return view('test.view', ['test' => ''1]); in javascript code example
Example: 14. Write a JavaScript function to find the difference of two arrays. Test Data : console.log(difference([1, 2, 3], [100, 2, 1, 10])); ["3", "10", "100"]
_.difference([1, 2, 3, 4, 5], [5, 2, 10]);
=> [1, 3, 4]