What does the plus sign do in ‘+new Date’

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?

7 Answers
7

Leave a Comment