How would I make my javascript timeout for only 3 seconds?

user1824806 picture user1824806 · Nov 15, 2012 · Viewed 12.8k times · Source

If 4e3 is equal to 4 seconds. What would I use for 3 Secs? or 2 Secs?

<SCRIPT LANGUAGE="javascript">
$( function() {
 setTimeout(function() {
        $('#loadingque').trigger('click');
    }, 4e3);
});
</script>

Answer

elclanrs picture elclanrs · Nov 15, 2012

If you understand why 4e3 is 4000 then you can figure out what 3000 looks like. eN means 10 to the power N, so 3 times 10 to the power 3 is 3000, or 3e3.