2079 8

BIT251 ยท 2079 ยท 5 marks

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]

Web Technology IChapter 7: JavaScript FundamentalsJavaScript variable declaration and definition

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...