Created
June 12, 2018 19:39
-
-
Save selbekk/303be30a817ae8b78c55e72d5a9288fb to your computer and use it in GitHub Desktop.
Date arithmethic
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const date = new Date(); | |
date + date | |
// "Tue Jun 12 2018 21:38:21 GMT+0200 (CEST)Tue Jun 12 2018 21:38:21 GMT+0200 (CEST)" | |
date - date | |
// 0 | |
date * date | |
// 2.3373282061373058e+24 | |
date / date | |
// 1 | |
+date | |
// 1528832363668 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment