<!DOCTYPEhtml><html><head><title>JavaScript Identifiers</title></head><body><h1>JavaScript Identifiers</h1><pid="result"></p><script>
let studentName = "Amit";
let courseName = "JavaScript";
let courseFee = 999;
function showDetails() {
document.getElementById("result").innerHTML =
studentName + " is learning " + courseName +
". Course fee is " + courseFee + ".";
}
showDetails();
</script></body></html>
Try It Yourself
Run the above example in the Try It Editor.
Try changing the identifier names such as studentName, courseName, and showDetails.
Make sure the new names follow JavaScript identifier rules.
Important Points
Identifiers are names used for variables, functions, objects, classes, and more.
Identifiers can contain letters, digits, underscore, and dollar sign.
Identifiers cannot start with a number.
Identifiers cannot contain spaces.
Identifiers cannot be JavaScript keywords.
JavaScript identifiers are case-sensitive.
camelCase is commonly used for variable and function names in JavaScript.
Conclusion
JavaScript identifiers are names used to identify different parts of a program.
Good identifiers make code easier to read and understand.
When writing JavaScript, always use meaningful names that follow identifier rules and clearly describe the purpose of the variable, function, or object.