---
title: "Discussion on \"How To Calculated Age For Date of Birth Using JavaScript\" | Hashnode"
description: "Discussion on \"How To Calculated Age For Date of Birth Using JavaScript\". Create a file age.js and fill it with this code:\n\n<!-- CHANGE ME -->\nvar DOB = \"August 31, 1998\";\n\nvar millisecondsBetweenDOBAnd1970 = Date.parse(DOB);\nvar millisecondsBetweenNowAnd1970 = Date.now();\nvar ageInMilliseconds = millisecondsBetweenNowAnd1..."
url: "https://hashnode.com/posts/how-to-calculated-age-for-date-of-birth-using-javascript/6479ba9968c73be8bfc40ef0"
---

[Feed](https://hashnode.com/feed) /

Discussion

# [How To Calculated Age For Date of Birth Using JavaScript](https://blog.aghea.xyz/how-to-calculated-age-for-date-of-birth-using-javascript?utm_source=hashnode&utm_medium=feed)

Create a file age.js and fill it with this code: <!-- CHANGE ME --> var DOB = "August 31, 1998"; var millisecondsBetweenDOBAnd1970 = Date.parse(DOB); var millisecondsBetweenNowAnd1970 = Date.now(); var ageInMilliseconds = millisecondsBetweenNowAnd1...

Apr 14, 2023 · 1 min read · blog.aghea.xyz  
Read the article

-   [#php](https://hashnode.com/tag/php)
-   [#redirects](https://hashnode.com/tag/redirects)
-   [#html](https://hashnode.com/tag/html)

## Written by

[Agcrismanto Budhi Praswastyka](https://hashnode.com/@agcrisbp)

@agcrisbp · Indonesia

  
[View profile](https://hashnode.com/@agcrisbp)

Multi-Instrumentalist for Aghea

A programmer who aware of the tiny moments in a person's life that reveal greater truths.

## Responses

Markdown supported · ⌘↵ to post

No responses yet.
