completed exercise 3.1

This commit is contained in:
counterweight 2025-05-31 22:51:30 +02:00
parent 68aa0e9905
commit 0bd43956c9
Signed by: counterweight
GPG key ID: 883EDBAA726BD96C
604 changed files with 67855 additions and 0 deletions

View file

@ -0,0 +1,12 @@
'use strict';
var $isNaN = require('./isNaN');
/** @type {import('./isFinite')} */
module.exports = function isFinite(x) {
return (typeof x === 'number' || typeof x === 'bigint')
&& !$isNaN(x)
&& x !== Infinity
&& x !== -Infinity;
};