Why can JS only read but not modify external variables in callback functions?

  node.js, question
var cs;  // 1 Declare a Variable cs Outside
 Av.cloud.http request (//2an http request)
 url:  'http://cn.bing.com/cnhp/coverstory' ,
 params: {
 mkt: 'zh-cn',
 d: date
 Success: function (httpresponse) {//3this is the callback function when success occurs.
 cs = httpResponse.text;  // 4 Give cs the content returned by http request
 error: function (httpResponse) {
 Error ('requestfailed with responsecode' plus httpResponse.status);
 response.success(cs);  // 5 Read cs Variable Outside

Why is it that when the cs variable is read in the fifth step, the cs of the first step is read, but it seems that the cs variable has not been modified in the fourth step?
If I move the line in step 5 after the line in step 4, that is, within the function, I can read the modified cs.
How to implement callback function to modify external variables and can be read externally?
JS xiaobai, may not ask well, please give more advice, thank you!

1) AV.Cloud.httpRequest is an asynchronous call
2) AV.Cloud.httpRequest and response.success are a relationship of sequential execution.
3) when response.success is executed, the AV.Cloud.httpRequest execution result does not get the cs value because it is asynchronous execution.
4) So when you perform step 5, you cannot get the value
5) In step 4, you can get the value by executing after the asynchronous result of AV.Cloud.httpRequest is obtained.

The concept of asynchronous execution is very important in js, especially when learning nodejs in the future, this concept should be kept in mind ~ ~ ~