Hacker News new | comments | show | ask | jobs | submit login

> Javascript doesn’t have integer type but lets you think it has

Actually, JS has integer typed arrays.

    new Uint8Array([1,100,300])
    [1, 100, 44]

    new Uint16Array([-1,2,300])
    [65535, 2, 300]

    new Uint32Array([-1,2,300])
    [4294967295, 2, 300]
Here's the spec:

https://www.khronos.org/registry/typedarray/specs/latest/#7




Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | DMCA | Apply to YC | Contact

Search: