From b516eb11cf8c7df3821c44658c59813ceb65e780 Mon Sep 17 00:00:00 2001 From: Stefano Pigozzi Date: Sun, 21 Nov 2021 16:11:05 +0100 Subject: [PATCH] =?UTF-8?q?=F0=9F=8E=93=20Use=20const=20in=20js=20example?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- thesis/source/docs/4_progetto/index.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/thesis/source/docs/4_progetto/index.rst b/thesis/source/docs/4_progetto/index.rst index 05f23f6..29f37f9 100644 --- a/thesis/source/docs/4_progetto/index.rst +++ b/thesis/source/docs/4_progetto/index.rst @@ -293,15 +293,15 @@ Fa inoltre abbondante uso della capacità dei linguaggi dinamici di definire fun .. code-block:: javascript - var cane = { + const cane = { verso: () => console.log("Woof!"), }; - var gatto = { + const gatto = { verso: () => console.log("Miao!"), }; - var zoo = [cane, gatto]; + const zoo = [cane, gatto]; zoo.forEach( (animale) => animale.verso()