How to delay in Javascript?

In Javascript, we may face situation where we may want to make the javascript file to wait certain seconds. In simple language, how can we delay a function for certain amount of time. For this kind of requirement we use setTimeut function. SetTimeout Function setTimeout function is used to delay a process for certain amount of […]

How to get current full year using Javascript?

In some cases we may need to complete a task in loop. To handle such situation, we have for loop in Javascript. For Loop Lets begin with an example to understand the need of “for loop” Example Lets print 1 to 10 Solution: <script> var num=1; console.log(num); num++ // incremented the value by 1 console.log(num); num++ // […]