2089. Find Target Indices After Sorting Array
var targetIndices = function(nums, target) {
const sortedNums = nums.sort((a, b) => a - b);
const result = []
sortedNums.forEach((nums, index) => {
if(nums === target){
result.push(index);
}
})
return result;
};