如果函数返回错误,则不再执行进一步的代码。我需要重试这个功能直到成功。我该怎么做?
... // API request... function(error, something) { if (!error) { something = true; // Etc... } else { // Code to try again. } }
javascript function node.js
function ×1
javascript ×1
node.js ×1