using startsWith method
```\n/*\n * @param {string[]} nums\n * @param {string} target\n * @return {number}\n /\nvar numOfPairs = function(nums, target) {\n    let count = 0;\n    for (
```\n/**\n * @param {string[]} nums\n * @param {string} target\n * @return {number}\n */\nvar numOfPairs = function(nums, target) {\n    let count = 0;\n    for (let i = 0; i < nums.length; i++) {\n        if (target.startsWith(nums[i])) {\n            for (let j = 0; j < nums.length; j++) {\n                if (i != j && nums[i] + nums[j] === target) {\n                    count++\n                }\n            }\n        }\n    }\n    return count;\n};
['JavaScript']