Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Arno Welzel Newsgroups: comp.lang.javascript Subject: Re: boolean while loops "how to stop" and "make room for textout to textarea" Date: Sat, 31 Oct 2020 18:52:59 +0100 Lines: 22 Message-ID: References: <6d2d33cc-9b19-469c-a25c-d8d2f862f0aco@googlegroups.com> Mime-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net A92AdoeFFq5t7eHP7ifqPQrupYdSgOmOzWtPombYD2M4Eovs/C Cancel-Lock: sha1:ljofzKMX2eHq1/3q3o7bCqxN26Y= In-Reply-To: Xref: csiph.com comp.lang.javascript:39065 Jonas Thörnvall: [...] > Have no idea what you talk about answer why javascript do not stop > loop when condition get false "boolean", and why it do not > ***manage*** to print out to form while in loop, much more > interesting question. JavaScript *is* able to do this. However you try to run a endless loop in a *browser* and wonder why the browser does not handle input as long as the loop runs. You just don't understand what "event driven" programming means. If you want to create an application with user interaction you MUST NOT create while()-loops which don't stop as long as the user does something. Such loops MUST be in a separate thread otherwise there is no chance for the runtime to deal with user input. -- Arno Welzel https://arnowelzel.de