作用域:程序员电脑中
上下文:用户内存中的
函数声明 / 函数表达式
function aaa{}
var f = function f(){}
function aa(){
yield 1;
yield 2;
yield 3;
}
const client = net.createConnection({
host: ‘127.0.0.1’,
port: 8099
}, () => {
// ‘connect’ listener.
console.log(‘connected to server!’);
client.write(‘POST / HTTP/1.1\r\n’);
client.write(‘Host: 127.0.0.1\r\n’);
client.write(‘Content-Type: application/x-www-form-urlencoded\r\n’);
client.write(‘\r\n’);
client.write(“name=winter”);
// client.write(‘field1=aaa&code=x%3D1\r\n’);
});
client.on(‘data’, (data) => {
console.log(data.toString());
client.end();
});
client.on(‘end’, () => {
console.log(‘disconnected from server’);
});