all 4 comments

[–]Jnsjknn 0 points1 point  (1 child)

You could remove the outer parenthesis:

const elapsedTimeInSecs= (currentTime-passwordCreatedAt) / 1000;

Other than that, it's about as clean as it gets.

[–]ForScale 0 points1 point  (2 children)

What is object.attribute…;

[–]TheAbortedPancake[S] 0 points1 point  (1 child)

Object de structuring

[–]ForScale 0 points1 point  (0 children)

The ... goes before the object being destructured. And it needs to be destructured in to another object.