Web Technology I20795 marksJavaScript variable declaration and definition
How variables in JavaScript are defined and declared? Write a JavaScript function that will include the variable having values number 5 and character '5' and print the variables.
How variables in JavaScript are defined and declared? Write a JavaScript function that will include the variable having values number 5 and character '5' and print the variables. [5]
JavaScript provides three keywords to declare variables: Keyword Scope Re-declarable Re-assignable Notes ----------------------------------------------------- var Function/Global Yes Yes Old way, hoisted let Block No Yes Modern, preferred const Block No No For constants Note: In JavaScript, varia...