pomfy113 / Reddit-Clone

0 stars 0 forks source link

Use const instead of var #8

Closed soggybag closed 6 years ago

soggybag commented 7 years ago

https://github.com/pomfy113/Reddit-Clone/blob/eee24de78e3cb28e1ee381fb5c14f522a3c1861a/models/post.js#L1

Use const or let instead of var.

Also this first two lines:

var mongoose = require('mongoose'),
Schema = mongoose.Schema;

Would probably be better written as:


var mongoose = require('mongoose');
const Schema = mongoose.Schema;

This is more clear as to what is happening here.