JavaScript Assignment-2
1.What are the variable naming conventions in JavaScript?
Variable names must start with a letter, underscore (_), or dollar sign ($). They cannot start with a number or any other special characters
Case sensitivity: Variable names are case-sensitive, meaning that myVariable, MyVariable, and MYVARIABLE are considered different variables
Characters: After the first character, variable names can include any combination of letters, numbers, underscores, or dollar signs
No spaces: Spaces are not allowed within variable name
Reserved words: JavaScript reserved keywords cannot be used as variable names.
2.Create a greeting alert (use => prompt, message, alert)
let name = prompt("Enter Your Name")
let message = ("Goodmorning ")
alert(`${message} ${name}`)- Write some code so that the values of the below variables switch around Let a = 5, let b = 8. Switch the value so that a holds the value 8 and the variable b holds the value 5
let a=11
let b=5
let c=b
b=a
a=c
console.log(a);
console.log(b);