function sum(num1, num2, callback) {
let res = num1 + num2;
let returnParam = callback(res);
console.log(returnParam);
}
sum(1, 3, function(result){
console.log(result);
return 'data for returnParam';
})
function sum(num1, num2, callback) {
var res = num1 + num2;
callback(res);
var returnParam = callback();
console.log(returnParam);
}
sum(1, 3, function(result, 'data for returnParam'){
return('data for returnParam');
console.log(result);
})
server {
listen 127.0.0.1:12345;
proxy_pass 127.0.0.1:8080;
}
server {
listen 12345;
proxy_connect_timeout 1s;
proxy_timeout 1m;
proxy_pass example.com:12345;
}
server {
listen 53 udp reuseport;
proxy_timeout 20s;
proxy_pass dns.example.com:53;
}
server {
listen [::1]:12345;
proxy_pass unix:/tmp/stream.socket;
}
server {
listen example1.alexdeg.ru;
proxy_pass 185.189.20.55:3000;
}
server {
listen example2.alexdeg.ru;
proxy_pass 185.189.20.55:3001;
}