javascript
Lodash - Get current timestamp in milliseconds
The Lodash now() function can be used to get the current timestamp. It returns the timestamp in milliseconds. See the below code examples to understand.
const timestamp = _.now();
console.log(timestamp);
Output
1649690293230
_.now() function
The _.now() function is an in-built function of Lodash Library and it is mainly used to get the current timestamp. The Lodash library is used to manipulate data in the form of arrays or objects.
Was this helpful?
Similar Posts
- Get current timestamp in javascript
- Get the current month name using javascript
- Get current year using Javascript Date getFullYear() method
- Remove all cookies from the current website using Javascript
- Get all values from an array which does not exist in other array Lodash
- Lodash - Get index of array item based on some condition
- Lodash - get the first element from an array