I’ve seen this in a few places
function fn() {
return +new Date;
}
And I can see that it is returning a timestamp rather than a date object, but I can’t find any documentation on what the plus sign is doing.
Can anyone explain?
I’ve seen this in a few places
function fn() {
return +new Date;
}
And I can see that it is returning a timestamp rather than a date object, but I can’t find any documentation on what the plus sign is doing.
Can anyone explain?