**Please do not work on this issue unless you have applied to the outreachy project.**

The [jpeg_viewer.js](https://github.com/mozilla/pdf.js/blob/master/examples/image_decoders/jpeg_viewer.js) example currently uses the older style of `promise.then` and callbacks. Convert it to use an `async` function and `await` style.

length = str.length;
  const bytes = new Uint8Array(length);
  for (let i = 0; i < length; ++i) {
    bytes[i] = str.charCodeAt(i) & 0xff;
  }
  typedArrayImage = bytes;
} else {
  typedArrayImage = new Uint8Array(request.response);
}
const jpegImage = new pdfjsImageDecoders.JpegImage();
jpegImage.parse(typedArrayImage);
const width = jpegImage.width,
  height = jpegImage.height;
const jpegData = jpegImage.getData({
  width,
  height,
  forceRGB: true,
});
const imageData = jpegCtx.createImageData(width, height);
const imageBytes = imageData.data;
for (let j = 0, k = 0, jj = width * height * 4; j < jj; ) {
  imageBytes[j++] = jpegData[k++];
  imageBytes[j++] = jpegData[k++];
  imageBytes[j++] = jpegData[k++];
  imageBytes[j++] = 255;
}
jpegCanvas.width = width;
jpegCanvas.height = height;
jpegCtx.putImageData(imageData, 0, 0);