A Javascript widget is essentially an appliance that you can add to your host webpage. it is very similar to an application on an iPhone. They are not usually connected to the host site and have little to no interaction with it. An example of a widget available on WordPress would be the calendar widget. This allows you to have a calendar on the sidebar of your webpage making it possible for viewers to see what is coming up next. This is very similar to the calendar on Moodle. I refer to the calendar on Moodle all the time to help me keep track of what assignment is due next. This widget is very convenient and useful.
Another great and useful widget is email marketing and signups. There are several different kinds of widgets available that all perform the same function of giving the viewer the option to sign up for email alerts. This also creates good advertising and marketing for the website, every time an email goes out the viewer remembers the website and why they liked it enough to sign up for emails. This widget is very useful to both the website creator and the person viewing it.