Home / CSE MCQs / Javascript MCQs :: Discussion

Discussion :: Javascript MCQs

  1. What is the returning value of the getContext() method?
  2. A.
    Drawing model
    B.
    CanvasRenderingContext2D object
    C.
    Context2D object
    D.
    None of the mentioned

    View Answer

    Workspace

    Answer : Option B

    Explanation :

    Call getContext() with the argument "2d to obtain a CanvasRenderingContext2D object that you can use to draw two-dimensional graphics into the canvas. It is important to understand that the canvas element and its context object are two very different objects.


Be The First To Comment