From 3781916cf9cd4fe66ee6e25993e1fa22df74958a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=D0=93=D0=BB=D0=B0=D0=B2=D1=80=D0=B5=D0=B4=20=7C=20Glavred?= Date: Thu, 17 Sep 2020 16:44:01 +0300 Subject: [PATCH] =?UTF-8?q?=D0=98=D0=B7=D0=BC=D0=B5=D0=BD=D0=B5=D0=BD?= =?UTF-8?q?=D0=B8=D1=8F=20=D0=BE=D1=82=20=D0=93=D0=BB=D0=B0=D0=B2=D1=80?= =?UTF-8?q?=D0=B5=D0=B4=D0=B0=20=D0=93=D0=B8=D1=82=D0=96=D0=A1=20|=20Chang?= =?UTF-8?q?es=20of=20GitJS=20Glavred?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- 0000 | 3 ++- функции|functions.js | 13 +++++++++++++ 2 files changed, 15 insertions(+), 1 deletion(-) create mode 100644 функции|functions.js diff --git a/0000 b/0000 index 9edd28a..78b2902 100644 --- a/0000 +++ b/0000 @@ -7,4 +7,5 @@ x /загрузка|loading.js x /пуск|run.js /пуск|run.череда x /фишки|tiles.js -/фишки|tiles.череда \ No newline at end of file +/фишки|tiles.череда +x /функции|functions.js \ No newline at end of file diff --git a/функции|functions.js b/функции|functions.js new file mode 100644 index 0000000..66e3d99 --- /dev/null +++ b/функции|functions.js @@ -0,0 +1,13 @@ +номерФишки = (фишки, id) => +{ + for (var номер in фишки) + { + var фишка = фишки[номер]; + if (фишка.id == id) + { + return номер; + } + } + + return null; +}; \ No newline at end of file