can the name of function be the same with name of variable js
If you use a function name as variable name, its value is replaced by
function body.
So var a becomes your function a and thus your alert displays function a.
Edit But if you assign value to a like var a = "xya";.
Then it function will be replaced by variable. As per Order of
precedence
!!Variable assignment takes precedence over function declaration!!
!!Function declarations take precedence over variable declarations!!
Also in JavaScript:
- add a Google Font to a VueJS
- variables in js
- how reliable is js hasownproperty
- what does function setup() do in javascript
- react nativ export default
- assign freemarker expressions to variables
- javascript iterate object
- Given a string S and a character C, return an array of integers representing the shortest distance from the character C in the string. javascript
- javascript remove element from the dom
- manual avanzado java script
- how to replace first and last character of string in javascript
- Generate a random number between 50 and 100 inclusively in javascript
- javascript detect browser type
- react native dynamic view size
- What is strict mode in Java Script ?
- how to return when child process is complete in node js
- javascript find last element in array
- javascript for loop over dictionary
- change the color of toast toastr js
- convert decimal to binary javascript
- paypal subscription based payout api reactjs
- recursive inquirerjs prompts
- javascript login validation
- linked list javascript