Monday, 4 August 2014

Quick quiz: checking your expectations

This is a super quick one. What would you expect this code to output:

a = ["a"];
a[3] = "c";

    writeOutput("value: #v#<br>");

This is not a trick question, and I'm not looking for "clever" answers. I just want to know - all things being equal - what output you'd expect here.

What info I'm after here is just which way people's expectations tend, not who's right or wrong.

Answers on a postcardin a comment, pls.