3 ms·function range_error_on_zero(x) {return Array(-!!x).length}by qb45 10y agofunction range_error_on_zero(x) {return Array(-!!x).length}GRiMe2D 10y agoThis is not related to OP's question in stackoverflow. Your function fails at runtime while running, but C code above fails while compilingqb45 10y agoBut only slightly less ugly was my point.