हिंदी

Write event driven JavaScript program for the following. Find and display factorial of given number. - Information Technology

Advertisements
Advertisements

प्रश्न

Write event driven JavaScript program for the following.

Find and display factorial of given number.

संक्षेप में उत्तर

उत्तर

Coding:

<html>
<script type="text/javascript">
var n=4,i,f=1;
for(i=n;i>= 1;i--)
{
f=f*i;
}
document.write("<br>Factorial of 4 is"+f);
</script>
</html>
shaalaa.com
DOM (Document Object Model)
  क्या इस प्रश्न या उत्तर में कोई त्रुटि है?
अध्याय 3: Advanced Javascript - Exercises [पृष्ठ ५२]

APPEARS IN

बालभारती Information Technology (IT) (Science) [English] 12 Standard HSC Maharashtra State Board
अध्याय 3 Advanced Javascript
Exercises | Q 7.3 | पृष्ठ ५२
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×
Our website is made possible by ad-free subscriptions or displaying online advertisements to our visitors.
If you don't like ads you can support us by buying an ad-free subscription or please consider supporting us by disabling your ad blocker. Thank you.