Home > front end >  Access to data in the function
Access to data in the function

Time:01-06

Dear eldest brother, to ask how to get spent outside the function value?

 
The function pingHost (host) {
The session. PingHost (host, (error, target, sent, RCVD)=& gt; {
If (error) {
The console. The log (` failed `);
} else {
Const spent=RCVD. GetTime () - sent. GetTime ();
Return spent;
}
})
}
  • Related