windowspeechSynthesisUtterance const var = new speechSynthesisUtterance(var1)
// Speed of Speech
var.rate = 1
// This event runs when Speech ends
var.addEventListener("end", () => {})
// This event runs every time we reach a new word that we want to speak
var.addEventListener("boundary", (e) => {
// Returns index of the first letter of the word that we are currently speaking
e.charIndex
})
// Start Speech
speechSynthesis.speak(var)
// Resume Speech
speechSynthesis.resume()
// Returns true if Speaking
speechSynthesis.speaking
// Returns true if not Speaking
speechSynthesis.paused
// Pause Speech
speechSynthesis.pause()
// Cancel Speech
speechSynthesis.cancel()
navigator.getUserMedia(
{ video: {} },
stream => video.srcObject = stream,
err => console.error(err)
)
navigator.mediaDevices.getUserMedia({ video: true })
window.onload = function() {} => Event executes when page is loadedalert("value") => Shows alertprompt("value") => Shows alert message and takes inputprompt("value1", "value2") => 2nd argument is default valueconfirm("value") => Returns value ok or cancellocalStorage => Stores data in local storage, Can not store arraylocalStorage.setItem('key', 'value') => Adds data in local storage as an object with key & value pairlocalStorage.getItem('key') => Returns the value of keylocalStorage.clear() => Clears entire Local storagelocalStorage.removeItem('key') => Remove only this key value pairJSON.stringify(varO/varA) => Converts valid JSON object/array into stringJSON.parse(varS) => Converts valid JSON string into objectsessionStorage => Same as local storage but clears all data when browser is closed