Creating classes in JavaScript can be done many ways. Explore creating prototypes, and the Node.js partial support of ES2015 class structure and some of the current limitations.
- [Narrator] Before we can write some code,…we're going to need to get an editor.…And my favorite is VS Code, or Visual Studio Code.…So let's go to code.visualstudio.com/download…and let's download the latest stable build for Windows.…It's a pretty straight forward install,…so I don't think there's any need to demonstrate it here.…Now that I'm in Visual Studio Code,…let's open a folder and open up our…previously created mpm folder on our desktop.…And let's go ahead and add a file…using the little plus icon here,…and let's call that index.js.…
And we're going to go ahead and create some JavaScript here.…On line 1, I'm going to say Var msg = "Hello world"…Classic message.…Console.log(msg).…I'm going to go ahead and save that file.…And just to see what's available to me,…in terms of debugging,…I'm just going to go ahead and add a break point…by clicking right here next to it.…From there I can hit F5…to start the debugger.…And as you can see, you have a very familiar looking…experience for the C# developer used to Visual Studio.…
Released
12/14/2018- Installing and publishing Node.js packages
- Defining classes in Node.js
- Building a web API with Express and Node.js
- Unit testing in Node.js
- Continuous integration
Share this video
Embed this video
Video: Defining prototypes and classes in Node.js