HTML5 oDesk Test 2015 Answers
1 : Assuming that some text needs to be written on an HTML5 canvas, select a replacement for the commented line below:<canvas id=”e” width=”200″ height=”200″></canvas>
<script>
var canvas = document.getElementById(“e”);
//insert code here
context.fillStyle = “blue”;
context.font = “bold 16px Arial”;
context.fillText(“Zibri”, 100, 100);
</script>
c) canvas.getContext(“2d”);
2 Can we store JavaScript Objects directly into localStorage?
b) No
3 Consider the following items of a <select> list:
<option value=”89″>Item 1</option>
<option value=”90″>Item 2</option>
Which of the following values would be passed on by clicking the submit button on selecting Item 2 from the list?