Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save mustafa-qamaruddin/442b9ee0dc9f843d87f426eb97a04cdc to your computer and use it in GitHub Desktop.
Save mustafa-qamaruddin/442b9ee0dc9f843d87f426eb97a04cdc to your computer and use it in GitHub Desktop.
// pass by value ; date
var d = new Date('July 13, 2016');
console.log(d.getTime());
function mutate(_d)
{
_d = new Date('August 20, 1989');
console.log(_d.getTime());
}
mutate(d);
console.log(d.getTime());
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment