Closed Winand closed 6 years ago
int could use parseInt to support base. Something like this:
int
parseInt
base
def _int(x, base=10): if isinstance(x, 'string'): return parseInt(x, base) else: return Math.ceil(x) if x < 0 else Math.floor(x)
Good idea!
int
could useparseInt
to supportbase
. Something like this: