The requirements are a bit ambiguous. The "example return value" is simply an array of numbers, which will not be able to hold a full 64-bit integer, so that looks contradictory to what the wording of the requirement is.
In case the example value is wrong and the requirement is correct, there is still some ambiguity.
It could be that they were expecting a typed 64-bit integer array (BigInt64Array):
new BigInt64Array([23n, 34n, 65n])
(It's also unclear whether signed or unsigned integers are desired. In case of unsigned, BigUInt64Array would be needed instead.)
It could also be that they were simply expecting an array of BigInt values:
[23n, 34n, 65n]
Or, of course, maybe the requirements are misleading and the example return value is correct, in which case regular numbers are expected (unable to hold 64-bit integers without loss of precision):
[23, 34, 65]
Or, perhaps, the requirement is simply to clamp the value to 64 bits and discard the overflow, in which case you'd have to use BigInt.asIntN:
function clamp (array) {
return array.map(n => BigInt.asIntN(64, n))
}
(In case unsigned integers are expected, you'd need BigInt.asUIntN instead.)
This would however assume an array of BigInts as input and would also output BigInts, so it would again not match the shown example return value which had regular numbers.
In summary, it seems that the question is either wrong in itself (either in its wording or in its example) or it may be simply impossible to do in JavaScript. There is not enough information provided to give a definite answer.