Path: csiph.com!weretis.net!feeder8.news.weretis.net!reader5.news.weretis.net!news.solani.org!.POSTED!not-for-mail From: Mild Shock Newsgroups: comp.lang.javascript Subject: Re: Do not use var / what about import [Confusion by John Harris] Date: Sun, 24 Mar 2024 14:06:23 +0100 Message-ID: References: MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 8bit Injection-Date: Sun, 24 Mar 2024 13:06:21 -0000 (UTC) Injection-Info: solani.org; logging-data="1865581"; mail-complaints-to="abuse@news.solani.org" User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64; rv:91.0) Gecko/20100101 Firefox/91.0 SeaMonkey/2.53.18.1 Cancel-Lock: sha1:TdXM0SkgcjU3yf4KKPVlIgRU4MU= In-Reply-To: X-User-ID: eJwFwYcBwDAIA7CXyrAJ54SR/0+oBKOwwwk6Hp5+KHSJKHRyF0pl3+1L6cnjdyPyTGrioNTcQmrMs6Yt+QNIThUP Xref: csiph.com comp.lang.javascript:124325 Or try another hobby than JavaScript. Like for example bird watching. Mild Shock schrieb: > Attention to John Harris > In case you are about to go on a fishing spree > for F.U.D. like here: > > Fear, Uncertainty and Doubt > https://de.wikipedia.org/wiki/Fear,_Uncertainty_and_Doubt > > Be warned, your findings might mostlikely come out > as lame accusations. Judging from your JavaScript > tutorials your are stuck somewhere in the yesterdays > yesterday of JavaScript, you write: > > > First, inside a function definition > > var v; > > makes v a local variable. > > [...] > > However, in 2015 two other kinds of variable > > were introduced that do have block scope. They > > are declared using the keywords const and > > let instead of var. > https://www.jghnorth.org.uk/notes/JSfeats.html > > Why not just admit that var is practically deprecated, > and make a fresher of your nonsene tutorials, remove it? > It's probably only still there for backward compatibility. > > 4 Reasons Why ‘var’ is Considered Obsolete in Modern JavaScript > https://plainenglish.io/blog/4-reasons-why-var-is-considered-obsolete-in-modern-javascript > > > Also I doubt you can run Dogelog Player for JavaScript > with your mindset, it requires ES6 modules. > >