JavaScript Scope

Outside myFunction() carName is undefined.