index.ts91 chars5 lines
Here, we use the import
statement to import the lodash library. We then define a Date
variable called currentTime
which will hold the current date and time. We set its value using the _.now()
function from lodash. Finally, we log the currentTime
to the console to see the output.
Note that we use the import
statement with the *
syntax which means that we import everything from the lodash library. The now()
function is then accessed through the _
namespace which is an alias we created for the entire lodash library.
gistlibby LogSnag