From the course: Learning Node.js

Unlock the full course today

Join today to access over 23,200 courses taught by industry experts.

Why is Javascript Node's language?

Why is Javascript Node's language? - Node.js Tutorial

From the course: Learning Node.js

Why is Javascript Node's language?

- [Instructor] Modern web apps and websites all have some front end components or functionality. Since the browser running these apps all use JavaScript, these components usually are written in JavaScript. It's nice to have both your front end and back end written in the same language for multiple reasons. First, there are no syntactical differences to worry about as with two different languages. For a long time, I was programming with C# only and switching to and from JavaScript and C# after long delays added some overhead to my ability to focus. This benefit is not as big as being able to share code and data structure between your front end and back end. Let's take a look at some examples of where code sharing might be useful. There are many great libraries for encryption or utility such as Underscore, that can be used for both the front end and the back end. An example could be, if you are writing a user authentication system with tokens, you might want to use the same token and…

Contents