Quantcast
Channel: Adam Cameron's Dev Blog
Viewing all articles
Browse latest Browse all 1333

Quick quiz: checking your expectations

$
0
0
G'day:
This is a super quick one. What would you expect this code to output:

//each.cfm
a = ["a"];
a[3] = "c";

a.each(function(v,i,a){
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.

--
Adam




Viewing all articles
Browse latest Browse all 1333

Trending Articles