diff --git a/snippets/Speech_synthesis.md b/snippets/Speech_synthesis.md index 781f20d55..db1e084cd 100644 --- a/snippets/Speech_synthesis.md +++ b/snippets/Speech_synthesis.md @@ -7,8 +7,8 @@ To know more - https://developer.mozilla.org/en-US/docs/Web/API/SpeechSynthesisU ``` speak = message => { - var msg = new SpeechSynthesisUtterance(message) - var voices = window.speechSynthesis.getVoices() + const msg = new SpeechSynthesisUtterance(message) + const voices = window.speechSynthesis.getVoices() msg.voice = voices[0] window.speechSynthesis.speak(msg) }