4. Summary and References


In summary,

  • The following are some of the ways JavaScript displays an output:
    • alert()
    • console.log()
    • document.write()
    • document.getElementById(id).innerHTML = “text” or id.innerHTML = "text"
  • To get an input from the user, the prompt() and confirm() method could be used.

References

JavaScript Generating Output—Tutorial Republic. (n.d.). Retrieved December 9, 2020, from https://www.tutorialrepublic.com/javascript-tutorial/javascript-generating-output.php

JavaScript | Output. (2019, March 28). GeeksforGeeks. https://www.geeksforgeeks.org/javascriptoutput/

JavaScript Output. (n.d.). Retrieved December 9, 2020, from https://www.w3schools.com/js/js_output.asp