0
Hey guys...so what the hell is an identifier,im using a mix between html and js
Heres my code for no reason <button onclick="showMessage()">log in</button> <script> function showMessage() {alert('logged in');} </script>
1 Antwort
+ 2
Hey Adam Ahmed! No worries, I'll explain what an identifier is in simple terms, especially since you're working with HTML and JavaScript.
An identifier is just a name you give to variables, functions, objects, or anything you define in your code. It's how you refer to them later.
In your code, 'showMessage' is an identifier (the name of your function). When you write <button onclick="showMessage()">, you're using that identifier to call the function.