Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.javascript > #124324

Do not use var / what about import [Confusion by John Harris]

From Mild Shock <janburse@fastmail.fm>
Newsgroups comp.lang.javascript
Subject Do not use var / what about import [Confusion by John Harris]
Date 2024-03-24 14:04 +0100
Message-ID <utp8d7$1otqp$1@solani.org> (permalink)

Show all headers | View raw


Attention to John Harris <niam@jghnorth.org.uk>
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.

Back to comp.lang.javascript | Previous | NextNext in thread | Find similar


Thread

Do not use var / what about import [Confusion by John Harris] Mild Shock <janburse@fastmail.fm> - 2024-03-24 14:04 +0100
  Re: Do not use var / what about import [Confusion by John Harris] Mild Shock <janburse@fastmail.fm> - 2024-03-24 14:06 +0100
  Re: Do not use var / what about import [Confusion by John Harris] John Harris <niam@jghnorth.org.uk.invalid> - 2024-03-25 15:31 +0000
    Re: Do not use var / what about import [Confusion by John Harris] Mild Shock <janburse@fastmail.fm> - 2024-03-28 00:28 +0100
      Re: Do not use var / what about import [Confusion by John Harris] Mild Shock <janburse@fastmail.fm> - 2024-03-28 00:35 +0100
  Re: Do not use var / what about import [Confusion by John Harris] Mild Shock <janburse@fastmail.fm> - 2024-03-29 00:03 +0100

csiph-web