PrepAway - Latest Free Exam Questions & Answers

Which JavaScript function should you use?

You develop a webpage that allows a user to download a 3PEG image and convert it to a PNG file.
You need to implement the code to download the contents of the JPEG image with no additional
decoding.
Which JavaScript function should you use?

PrepAway - Latest Free Exam Questions & Answers

A.
readAsBinaryString()

B.
readAsArrayBuffer()

C.
readAsDataURL()

D.
readAsText()

3 Comments on “Which JavaScript function should you use?

  1. rik says:

    Wow.
    Where did this question come from? Certainly not the the 70-480 Exam-ref or the training guide… Anybody know of a link that can explain why this and not one of the others is the correct answer?




    0



    0
  2. Y says:

    readAsArrayBuffer()

    The readAsArrayBuffer() method will read a Blob or File object and produce an ArrayBuffer. An ArrayBuffer is a fixed-length binary data buffer. They can come in handy when manipulating files (like converting a JPEG image to PNG).

    So, it’s B




    2



    0

Leave a Reply