And with you having said all that, now I need you to go back and look at what was asked and how I responded. OP was looking to write code for personal use, automation, generating reports. As valid as everything you said is, trying to write to best practices doesn't apply when getting off the ground. Yes PowerShell is shyt, but if someone is in an all Windows environment, they could be forced that way. You gotta do what you gotta do to get the job done right?Javascript is not a language to learn best practice programming. It's missing variable scope, it's is weakly typed, its object mechanism is not classical objects composition/inheritance, it has serious ambiguous parses. syntax is a self-contradictory after thought.
I should not have to point this out to you.
If you think JS is a suitable beginners programming language then you yourself have not been properly trained to program.
Even crockford had to demarcate the useful parts of JS in "JS the good parts" and even then people would be better off using typescript or ECMAscript.
How are you going to learn about encapsulation or objects in a language which doesn't implement either properly?
Powershell is a piece of crap. Do you know how to tail -f in powershell?
Powershell is so bad that microsoft had to add bash to windows.
Using shell to describe powershell is a misnomer because shells on windows are not plug and play and even after you install them the very nature of the underlying system renders them unsuitable for anything complicated. windows importing of -nix concepts leads to contradictions such as links not being first order objects, locks controlling file access and presence, path types being incompatible, commands outputting random space, command output being unstructured and too talkative, no default error stream, inconsistent interpretation of space in scripts
Powershell and Javascript are not good entry points to programming![]()
Similar reasoning to the next person I responded to. We're trying to get a 10 year old into it. Using JavaScript can get them hands on with a language and segue them into a framework so that they can produce something that gives instant feedback. I was 14 trying to self teach. Trying to use SOLID principles and thoroughly understand OOP concepts would have turned me all the way off to the discipline.
We can agree to disagree, we can even disagree to disagreeing, but you ain't gotta come at me sideways.