Jul 21, 2024
price, product, and tax.price + tax.+, -, *, /.++ and --.function name(parameters) { code to execute }.Functions can take parameters and return values.
Example: Function to add two numbers and return the result.
Example: Function to calculate area given length and breadth.
&& (and), || (or), ! (not).for (initialization; condition; increment/decrement) { }document.getElementById to select elements.element.textContent = "new text".appendChild, and insertAdjacentElement.addEventListener for events like click, mouseover.Math.random().