# To get the time duration of a particular step using JavaScript

<div id="bkmrk-javascript-to-find-t">Javascript to find the time duration of a particular step:

var $startTime = new Date().getTime(); ---- Before the step starts  
\--- Actual Steps  
var $endTime = new Date().getTime(); ---- After the step  
var $diff = $startTime - $endTime — Log the difference  
\_log("" + $diff); — Display it

 </div><div id="bkmrk-last-updated%3A-june-0">---

Last updated: <span class="mc-variable General.NewDateTimeVariable variable">June 02, 2023</span>

If you have any feedback on this topic, please contact us at <documentation@appvance.ai>

</div>