Different ways of rendering a variable using EJS

The simplest way of rendering a variable is using the scriptlets, similar to the ones used in JSPs <%= variable %> But if you want your code to be rendered or executed but not printed then render it like this: <% variable %> If you want your code to be evaluated as well as rendered (ex: variables containing HTML code) then use: <%- variable %> <!-- See the use of minus symbol within the scriptlets --> We usually use the last method to render HTML on our EJS pages.

How to install the latest nodejs version in ubuntu

As of writing this article the latest node version was 4.2.4, you can install this one using the distribution from NodeSource repository: sudo apt-get install curl curl --silent --location https://deb.nodesource.com/setup_4.x | sudo bash - sudo apt-get install nodejs You can find all the sources here, https://github.com/nodesource/distributions/tree/master/deb Then, you have the latest version of node.js installed.