Without using set and array methods
\n\n# Code\n\n/**\n * @param {number[]} nums1\n * @param {number[]} nums2\n * @return {number[][]}\n */\nvar findDifference = function (nums1, nums2) {\n    let
\n\n# Code\n```\n/**\n * @param {number[]} nums1\n * @param {number[]} nums2\n * @return {number[][]}\n */\nvar findDifference = function (nums1, nums2) {\n    let arr1=[];\n    let arr2=[];\n    for (let i = 0; i < nums1.length; i++) {\n        let flag=true;\n        for (let j = 0, k=i+1; j < nums2.length+nums1.length; j++,k++) {\n            if(nums1[i]===nums2[j] || nums1[i]==nums1[k]){\n                flag=false;\n            }\n        }\n        if(flag){\n            arr1.push(nums1[i])\n        }\n    }\n    for (let i = 0; i < nums2.length; i++) {\n        let flag=true\n        for (let j=0,k=i+1; j < nums1.length+nums2.length; j++,k++) {\n            if(nums1[j]==nums2[i] || nums2[i]==nums2[k]){\n                flag=false;\n            }\n        }\n        if(flag===true){\n            arr2.push(nums2[i])\n        }\n    }\n    return [arr1,arr2]\n};\n```
['Array', 'JavaScript']