Welcome to the Treehouse Community

Want to collaborate on code errors? Have bugs you need feedback on? Looking for an extra set of eyes on your latest project? Get support with fellow developers, designers, and programmers of all backgrounds and skill levels here with the Treehouse Community! While you're at it, check out some resources Treehouse students have shared here.

Looking to learn something new?

Treehouse offers a seven day free trial for new students. Get access to thousands of hours of content and join thousands of Treehouse students and alumni in the community today.

Start your free trial

JavaScript Adding MongoDB to your Node App on Heroku

non ES6 version of this code

In the course its mentioned that "In order to run JavaScript in ECMA 6, you have to have a later version of Node. There's information in the teacher's notes on how to run later versions of Node." 2 questions: i) I don't see this info around running a later version of Node, where is it please? ii) It also mentioned changing Const and Let to Var if you wan to use ES 5, however I also see the use of arrow functions, et cetera in the code. Do you have a ES 5 version of the code available please? Thanks

2 Answers

jason chan
jason chan
31,009 Points

Hi Ian,

You just install the new version of node.js from the website.

https://nodejs.org/en/download/

node file.js

in console.

alttext

cheers

jason chan
jason chan
31,009 Points

Glad I could be a of service. :smile: