rmp2150 rmp2150 - 5 months ago 27
Node.js Question

In Node JS, what is the difference between Require Express and HTTP together and separately

This is probably a very basic question.

But what is the difference between these two code snippets:

const express = require ('express');
const http = require ('http');


const express = require ('express'),
http = require ('http');


There's no difference. The docs state that you can initialize one or more variables with comma separation.

const name1 = value1 [, name2 = value2 [, ... [, nameN = valueN]]];