0

I need to make a Uinte8Array. I am using CloudPebble and it says that Uint8Array is not defined.

How can I declare this object in CloudPebble?

https://i.stack.imgur.com/w7eTU.png

  • Assuming buf is ArrayBuffer then it should work fine (console.log(buf) before making Uint8Array view for it) –  Jun 05 '15 at 01:01

1 Answers1

0

CloudPebble is lying, you can use it. I'll put a report in to fix it, so it doesn't lie to you.

If you want to you can wrap the erroneous line like this so jshint won't complain.

/* jshint ignore:start */
var byteArray = new Uint8Array(buf);
/* jshint ignore:end */
Kirby Kohlmorgen
  • 396
  • 1
  • 2
  • 9