Performing a GET request

To illustrate the communication between client (using JavaScript) and server (also using JavaScript), we'll write a script that only sends one dictionary entry to the browser on each request. The entry chosen will depend on a parameter sent from the browser. Our script will pull its data from an internal data structure like this:

const E_entries = {  EAVESDROP: {    part: 'v.i.',    definition: 'Secretly to overhear a catalogue of the ' +                'crimes and vices of another or yourself.',    quote: [      'A lady with one of her ears applied',      'To an open keyhole heard, inside,',      'Two female gossips in converse free —',      'The subject engaging them was she.',      '"I think," said one, "and my husband thinks', 'That she's a prying, inquisitive ...

Get Learning jQuery 3 - Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.