Skip to content

Instantly share code, notes, and snippets.

View umar-ibn-shafee's full-sized avatar
🎯
Focusing

Mohammed Umar Ibn Shafee umar-ibn-shafee

🎯
Focusing
  • Hyderabad, India
View GitHub Profile
@umar-ibn-shafee
umar-ibn-shafee / answer1.js
Last active November 29, 2018 23:32
Oursky Pre-test
/**
* This @function checkSubset will check if arr2 is subset of arr1.
* @param {Array} arr1 this is the array to be checked over.
* @param {Array} arr2 this is the array to check if it is subset of arr1.
*/
function checkSubset(arr1, arr2) {
/**
* Validating the parameters passed.
*/
if ((Array.isArray(arr1) && arr1.length > 0) && (Array.isArray(arr2) && arr2.length > 0)) {