A code chunk's lines of code must be in the same order you want them to be when the code is converted for the computer.
<<a>>=
console.log(foo)
@
<<a>>+
var foo = "bar"
@
Foo needs to be set as bar because of blah blah blah...
This is because the above chunk will be tangled into:
console.log(foo) var foo = "bar"
which is not legal JavaScript.