Prime pairs with target sum
Approach\n1. Execute a for loop which checks the given number and its complement is prime number or not.\n2. if both are prime numbers then push to an empty arr
# Approach\n1. Execute a for loop which checks the given number and its complement is prime number or not.\n2. if both are prime numbers then push to an empty array.\n\n# Complexity\n- Time complexity:\n<!-- Add your time complexity here, e.g. $$O(n)$$ -->\n\n- Space complexity:\n<!-- Add your space complexity here, e.g. $$O(n)$$ -->\n\n# Code\n```javascript []\n/**\n * @param {number} n\n * @return {number[][]}\n */\nvar findPrimePairs = function (n) {\n    let store = [];\n    for (let i = 1; i <= n / 2; i++) {\n        if (primeNumber(i) && primeNumber(n - i)) {\n            store.push([i, n - i])\n        }\n    }\n    return store;\n};\n\nfunction primeNumber(data) {\n    if (data <= 1) {\n        return false;\n    }\n    else if (data === 2 || data === 3) {\n        return true;\n    }\n    else if (data % 3 === 0 || data % 2 === 0) {\n        return false;\n    } else {\n        for (var i = 5; i <= Math.sqrt(data); i = i + 6) {\n            if (data % i == 0 || data % (i + 2) == 0) {\n                return false;\n            }\n        }\n        return true;\n    }\n}\n```
['JavaScript']