Added details and example of variable scoping

Also updated md so JS code is colored properly. Plus a few other small
changes.