node-worker-factorial icon indicating copy to clipboard operation
node-worker-factorial copied to clipboard

1n , what is means??

Open wwb568109135 opened this issue 6 years ago • 1 comments

const calculateFactorial = numArray => numArray.reduce((acc, val) => acc * val, 1n); https://github.com/BuildingXwithJS/node-worker-factorial/blob/f4e5e8372f29f18b2445534938954a8d4a8c042b/factorial-worker.js#L6

wwb568109135 avatar Aug 23 '19 06:08 wwb568109135

@wwb568109135 this is BigInt notation, for more info see MDN: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/BigInt

yamalight avatar Aug 23 '19 08:08 yamalight