How to check whether an array is a sub array of another array in Javascript

Below code snippet can be used to find whether an array is a sub array of another array in JavaScript

Results :