From 74d7e4d6dd69517e18f887bd6d2723f2d20b0338 Mon Sep 17 00:00:00 2001 From: Denis Buzdalov Date: Sun, 5 May 2024 23:36:48 +0300 Subject: [PATCH] [ refactor ] Make one `let` to be `const` because it actually is one --- apps/andark/app.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/apps/andark/app.js b/apps/andark/app.js index 2ffdd453e..443b3eabd 100644 --- a/apps/andark/app.js +++ b/apps/andark/app.js @@ -7,9 +7,8 @@ const settings = Object.assign(defaultSettings, require('Storage').readJSON('and const c={"x":g.getWidth()/2,"y":g.getHeight()/2}; -let zahlpos=[]; -//calculates the Position of the numbers when app starts and saves them in an array -function setlet(){ +const zahlpos=(function() { + let z=[]; let sk=1; for(let i=-10;i<50;i+=5){ let win=i*2*Math.PI/60; @@ -20,11 +19,11 @@ function setlet(){ if(sk==9){xsk+=10;} if(sk==12){ysk+=10;} if(sk==10){xsk+=3;} - zahlpos.push([sk,xsk,ysk]); + z.push([sk,xsk,ysk]); sk+=1; } -} -setlet(); + return z; +})(); let unlock = false;