From ed93fea14102b1df61e890faf8e8b67e8288dc3a Mon Sep 17 00:00:00 2001 From: HiEv <38147576+HiEv@users.noreply.github.com> Date: Tue, 6 Jun 2023 00:49:48 -0500 Subject: [PATCH] DOC: Remove invalid use of const in example code (#573) --- doc/source/netscript/netscriptmisc.rst | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/doc/source/netscript/netscriptmisc.rst b/doc/source/netscript/netscriptmisc.rst index f332ad89b..eaefc381f 100644 --- a/doc/source/netscript/netscriptmisc.rst +++ b/doc/source/netscript/netscriptmisc.rst @@ -33,7 +33,7 @@ Now assume we ran the following simple script .. code:: javascript export async function main(ns) { - for (const i = 0; i < 10; ++i) { + for (var i = 0; i < 10; ++i) { ns.writePort(1, i); //Writes the value of i to port 1 } } @@ -47,7 +47,7 @@ Then, assume we run the following script .. code:: javascript export async function main(ns) { - for (const i = 0; i < 3; ++i) { + for (var i = 0; i < 3; ++i) { ns.print(ns.readPort(1)); //Reads a value from port 1 and then prints it } }