Member-only story

Joke-teller with Javascript

YvonneDev
4 min readOct 2, 2020

--

Joke-teller is a project with Javascript, based on VoiceRSS API and Joke API.

Joke API

VoiceRSS API

CODE SEPARATE BELOW:

HTML

The image is the initial pic, and it will replace a gif file in JS.

The audio is the joke fetched from JokeAPI , which is being hidden.

When clicking the button, the image will animate and the audio will play.

And the config.js file is for storage of API key, because of the security problem when deploying to Github.

CSS

Import the google font if you want.

Center the items inside of the container.

Give button the stylish, such as hover, active and disabled.

--

--

YvonneDev
YvonneDev

Written by YvonneDev

❤️Front-end Web Development self-taught *share what I learned*

No responses yet