M
M
mmvlad2014-09-11 19:20:25
JavaScript
mmvlad, 2014-09-11 19:20:25

JavaScript - how to cast int to byte (as in Java)?

How to cast int to byte (as in Java) ?
In Java, (byte)210 will be -46.
How to implement a similar cast in JavaScript?
Thanks

Answer the question

In order to leave comments, you need to log in

1 answer(s)
K
KOLANICH, 2014-09-11
@mmvlad

There are types. Try Int8Array, Uint8Array and ArrayBuffer for conversion.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question