Ranked in these QuestionsQuestion Ranking
Pro Required for web development
Pro No installation required
Pro Runs on both the browser and the server
Pro Instant gratification
Pro First-class functions with lexical closures
Pro Easy to build an application
By using the UI capabilities in HTML and CSS you can develop substantial applications with graphical interfaces more quickly and with less effort than in other languages which would require you to learn a windowing library.
Building a useful application is one of the best ways to learn a new language and because of the low learning curve for creating applications you can create more substatial programs and learn more practical programming priciple faster.
Pro Massive ecosystem
Pro C-like syntax
Pro JSON is native to JS
JSON is arguably a "must-learn". With JS, that's one less additional syntax to learn.
Pro Very good debugger
Has a built in debugger with break points, watches that work on local values, and a console that you can use to edit anything at any time. Both in the browser (eg: Chrome), and server (eg: Nodejs).
Pro Complete dev stack can be run online
Pro Can be very simple (teachable)
By setting a few ground-rules (effectively coding in a subset of JS), JS is one of the simplest languages to learn (requiring very few must-learn prerequisite concepts).
Pro Several Platforms to use the web stack and JS to create multi-platform apps
Opens the door to native application development as well as just websites. Use with React Native, Weex or Quasar (Vue), PhoneGap or Cordova, NativeScript... (etc) to build native apps. Use mostly the same code base for multi-platform and web.
Pro Great tools for development
Flow, JSHint/ESLint, Babel, npm, etc.
Pro Modern ESNext is far better than the JS of days past
Modern JS has made great strides, and can be targerted to older (or non-standard) browsers using Babel. There are new language constructs that can make programming in JS comfortable.; e.g.: async / await ( <3 ).
May also be a con.
Pro Prototype based Object Oriented System
For example, in a prototypical language, you think of a rectangle, and define it. You now have a rectangle. Let's say you want a red rectangle, you copy the rectangle and give it the property red. Want a blue one? Copy rectangle again give it a blue. Big blue rectangle? Copy blue rectangle and make it big. In a class-based language, first you describe a rectangle, describe a red rectangle as a type of rectangle, describe blue and big blue rectangles, and now that you have described them, you must create instances of them, and only then do you have the rectangles. Essentially: Classes are factories for objects, prototypes are objects themselves, and the latter method was created to be more intuitive, which is particularly advantageous to beginners.
Pro Speed (most implementations)
JS/ES is in the running for the fastest interpreted language given the optimizations and JIT integration of popular implementations. On the other hand, it fails utterly when compared with compiled (to native or VM code) languages.
Pro Integrates very well with UE4
Coding an immersive 3D game can retain the attention of new programmers. ncsoft/Unreal.js.
Pro Extremely popular
Pro The most used language in the whole Solar System in amount of scripts/applications
Because it runs in many different environments, it is the most used language in the world.
Pro Incredibly Well-Engineered Language
Where other languages invoke the feeling of being a product of organic growth over time, C# just feels like an incredibly well-designed language where everything has its purpose and almost nothing is non-essential.
Pro .NET is a great toolbox
C# runs on top of the .NET framework, which provides many libraries containing classes used for common tasks such as connecting to the Internet, displaying a window or editing files. Unlike many other languages, you don't have to pick between a handful of libraries for every small task you want to do.
Pro Awesome IDE for Windows
On Windows, Visual Studio is the recommended C# IDE. It provides a very flexible GUI that you can rearrange the way you want and many useful features such as refactorings (rename a variable, extract some code into a method, ...) and code formatting (you can pick exactly how you want the code to be formatted).
Visual Studio also highlights your errors when you compile, making your debug sessions more efficient since you don't have to run the code to see the mistakes. There's also a powerful debugger that allows you to execute the code step-by-step and even change what part of the code will be executed next. In addition to giving you all the line-by-line information you'll need in a hassle-free manner, Visual Studio has stuff you can click on in the errors window that will take you to the documentation for that error, saving you several minutes of web searching.
In addition to all of this, Visual Studio has an intuitive, intelligent, and helpful graphical user interface designer that generates code for you (the best of WYSIWYG, in my opinion), which is helpful for new programmers. Being able to create a fantastic-looking UI with one's mouse and then optionally tweak with code helps make programming fun for beginner developers.
Visual Studio also has the best code completion --Intellisense is every bit as intelligent as the name says it is. It, as well as VS's parameter hinting, is context-, type-, user-, and position-sensitive, and displays relevant completions in a perfectly convenient yet understandable order. This feature allows a new programmer to answer the questions "What does this do?" and "How do I use it?" right then and there rather than having to switch to a browser to read through extensive documentation. This allows the programmer to satisfy their curiosity before it is snuffed out by several minutes of struggling through exhaustive documentation.
And for the more adventurous and text-ready developer, Microsoft does the best job of ensuring that everything, from interfaces and wildcard types down to Console.WriteLine("") and the + operator, is well-documented and easy to understand, with relevant and well-explained usage examples that manage to be bite-size yet complete, simple yet truly helpful. The reference site is easy to navigate, well-organized, clean and uncluttered, up-to-date, and fresh and enjoyable to look at, and every page is well-written with consideration for readers who are not C# experts yet want to read about changing the console background color.
The best part? It's free! Visual C# Express contains all of the features described above, at zero cost. If you are a student, you can probably get Visual Studio Professional from your university, which also includes tools for unit testing and supports plugins.
Pro Supports some functional features
C# is primarily object-oriented, but it also supports some features typically found in functional languages such as lambdas, delegates and anonymous classes. Methods can be treated like any other object, and the Linq query system operates on monads with lazy evaluation (though it hides this with a lot of syntactic sugar).
You don't need to use these features to code in C#, though, so you can start with OOP and then learn about them.
Pro Great introduction to object-oriented programming
Object-oriented programming is the most widely-used paradigm. C# offers support for common OOP features such as classes, methods and fields, plus some features not found in competing languages like properties, events and static classes.
C# code is much more readable thanks to the syntactic sugar it offers. You can truly concentrate on your code, not on the way it's implemented.
Pro Best language for Windows programs
C# is clearly the best choice for Windows programs. The .NET framework contains everything you need to build great-looking apps, without having to learn the confusing Win32 API or download a ton of external libraries. C# can also be used to build Windows 8's "modern" apps.
Pro Very high demand in the industry.
Pro Supported on many platforms
C# can be used for Windows apps, Linux apps, OS X apps, Windows 8 "modern" apps, websites, games, iPhone apps, Android apps, Windows Phone apps, and more.
If you want to create a cross-platform application, you can share most of the code and write one GUI for each platform.
Pro Can mix high and low level programming
You can code at the high level without worrying about pointers and memory management, but if you so choose you can switch to lower level programming with direct memory management and pointer manipulation (though you need to compile to specifically allow this).
Pro With ASP CORE a good language to learn
With CORE you are no longer just limited to Windows, so a language worth learning.
Pro Great language for Unity game engine
Unity provides a selection of programming languages depending on preference or knowledge - C#, JS, Boo and UnityScript. C# is arguably the most powerful with better syntax and stronger language structure. It allows using script files without attaching them to any game object (classes, methods inside unattached scripts that can be used at any time). There are more tutorials and information for C# than UnityScript and Visual Studio can be used to code for unity in C#. Additionally, learning C# allows using it outside of Unity as well unlike UnityScript.
Pro .NET truly universal
With .NET core it is a truly universal programming language which support desktop apps (Windows), Mobile apps (Xamarin), Web Apps (ASP.Core MVC). Also is perfectly fit to serverless programming for micro services. Soon it will be also support Web assembly (Blazor).
Con The "this" keyword doesn't mean what you think it means
this is bound to whatever object called the function. Unless you invoke it as a method. Unless you invoke it as a constructor. Unless it's an arrow function.
Con Many errors pass silently
Con Does not teach you about data types
Con Easy to accidentally use globals
If you forget a
Con Weird type coercions
'5' - 1 == 4, but
'5' + 1 == 51. There are other examples that make even less sense.
Con Limited standard library
Much often needed functionality is not in the standard library. (Contrast with Python.) However, there are well established libraries such as Lodash, to fill the gap (however, due to the diverse/fractured ecosystem it may not be clear what library to use).
Con Each browser has its own quirks when executing the same code in some cases
Beginner programmers often make the mistake of coding something, seeing it works in the browser they tested it in, and then scratching their heads when it doesn't work in another browser. Ideally you'd want a language that works consistently across all platforms in order to be able to focus more on the programming and less on the underlying environment. It just takes time away from learning and forces you to spend time figuring out why this worked in browser X but not browser Y.
Con Asynchronous coding is not easy for beginners
Con Fast moving
The language and the web platform move fast these days. this makes it difficult for students as there is a lot of fragmentation and outdated information.
Con The `null` and `undefined` objects aren't really objects
Therefore, attempts to call methods on them will fail. This is especially frustrating since these are often returned instead of throwing exceptions. So a failure may appear far away from the actual cause, which makes bugs very hard to find.
Con Array-like objects
Many cases when you should get an Array, you just get an Array-like object instead and none of the Array methods work on it.
Con Numbers that begin with 0 are assumed octal
This is very surprising for beginners. Especially since
07 seem to work just fine. And this isn't just for hardcoded numbers. The
parseInt() function has the same problem, but only on some systems.
Con The constant churn of tooling and language
Con Many tutorials, code, and resources, are structured for older ES5 code
Con Easy to fall into bad manners and bad mind structure
It wouldn't consolidate a good mind structure for moving to other languages. Too open.
Con Good tools are pretty much a MUST for new programmers
You really want to be using a good editor (light IDE) and a linter, type checker (e.g.:Flow), etc. until you grok the language. And choosing / setting-up that development environment is it's own learning curve. If taught in a classroom, using a subset of JS with solid tools, there is an argument that JS could be an ideal first language... however, that is a lot of ceremony to protect the new programmer from JS gotchas. But without the tools, JS can be a very painful painful first language (trying to figure out why your code isn't doing what you intended).
Con Very confusing to read
Con Has really bad parts you're better off avoiding altogether
Con Counter-intuitive type conversion
3+5; // 8; "Hello "+"world"; // "Hello world"
+ with a string and a non-string operand, the non-string operand is converted to a string and the result is concatenated:
"the answer is "+42; // "the answer is 42" "this is "+true; // "this is true"
In any other case (except for Date) the operands are converted to numbers and the results are added:
1+true; // = 1+1 = 2; null+false; // = 0+0 = 0;
Con Fractured ecosystem
Angular, React, Ember, Meteor, Backbone, Knockout, Express, Mithril, Aurelia. The web frameworks pass in and out of fashion too quickly to keep up with. The endless civil wars are becoming tiresome.
Con Dependecy on IDE
Most people learn and depend on VisualStudio to write C#. The result is people learn how to use an IDE and not the concepts or fundamentals of good programming. This isn't necessarily a knock on the language itself, but it is frustratingly difficult to do things in C# when not using VS.
Con Too easy to write multithreading apps that are buggy
Many web frameworks or GUI libraries will push novice users to writing multithreaded code, which leads to frustrating race condition bugs.
Other languages with multithreading push users towards safe constructs, like passing messages and immutable or synchronized containers. But in C# the data structures aren't synchronized by default, and it's too easy to just set a field and observe the result from another thread (until you compile with Release, and now you have a heisenbug).
Con Complex syntax
Too many syntactic constructs to learn before it becomes usable.
Con Often-used products in most C# development environments get expensive
The majority of the C# development community uses Microsoft products which are not all free and open-source. As you get into the enterprise level of some of these products and subscriptions, the expense is multiple factors of 10 greater.
While you can use a fully open-source and free C# environment, the community around that is much smaller. While this can be said for other languages as well, the majority of C# falls into the for-pay Microsoft realm.