After having some trouble installing underscore (because it's not underscore.js but only underscore), I try to use a underscore function (_.once) but I get this error, I have const Underscore = require("underscore")
on the top of my code, but still, and when I try const Underscore = require("underscore.js")
it doesn't find the modul, so you could please enlighten me ?
I'm a reall beginner at JavaScript, forgive me if I do something obviously wrong ;p
Your code assigns the underscore library to a constant named Underscore
.
What I think you want is: const _ = require("underscore");
which will assign the underscore library to a constant named _
.
Omg thanks, since I didn't take any lesson of javascript I wasn't understanding what did this command really means, but now I got it, thanks :D
Your code assigns the underscore library to a constant named
Underscore
.
What I think you want is:const _ = require("underscore");
which will assign the underscore library to a constant named_
.
Was looking this for hours...
Your code assigns the underscore library to a constant named
Underscore
.
What I think you want is:const _ = require("underscore");
which will assign the underscore library to a constant named_
.
Thank you. this works when you are working on react application also.
Your code assigns the underscore library to a constant named
Underscore
.
What I think you want is:const _ = require("underscore");
which will assign the underscore library to a constant named_
.
thnx a lot
Most helpful comment
Your code assigns the underscore library to a constant named
Underscore
.What I think you want is:
const _ = require("underscore");
which will assign the underscore library to a constant named_
.