VBScript Brain Teaser

Posted on 4 CommentsPosted in Programming

Okay, here’s a “fun” little brain teaser to test how well you understand VBScript. This first code snippet behaves exactly as you would expect: Z() defines a global variable, and this variable remains visible after the function returns:

This next code snippet introduces a minor variation, but now the last line produces an error: […]