Open bunnybunbun37204 opened 5 months ago
let
var
const
try { var response = UrlFetchApp.fetch(lineNotifyEndPoint, options); } catch (error) { Logger.log(error.name + ":" + error.message); return; } if (response.getResponseCode() === 200) { Logger.log("Sending message completed."); }
To
try { const response = UrlFetchApp.fetch(lineNotifyEndPoint, options); if (response.getResponseCode() === 200) { Logger.log("Sending message completed."); } } catch (error) { Logger.log(error.name + ":" + error.message); return; }
4. Maintain consistent indentation, spacing, and naming conventions. Use tools like **ESLint** to enforce coding standards.
Geng mak mak kub Good Job
Best practices rules
let
instead ofvar
for the variables that need to be changed.const
instead ofvar
for the variables that won't be changed.To