Member-only story

Speak guessing number game with Javascript

YvonneDev
3 min readJan 1, 2021

--

course from Brad Traversy

Github code

Feature:

SpeechRecongnition Web API

HTML

msg is the container to show the user speaking content and also a selected message

CSS

style the play-again button

the box is for the detective content speaking

JS

select the element of the message box

First, generate the random number to be the right answer

Math.random() to generate a number between 0–1

format the number with Math.floor() to get a number between 1–100

--

--

YvonneDev
YvonneDev

Written by YvonneDev

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

No responses yet