• Home
  • Recent Q&A
  • Java
  • Cloud
  • JavaScript
  • Python
  • SQL
  • PHP
  • HTML
  • C++
  • Data Science
  • DBMS
  • Devops
  • Hadoop
  • Machine Learning
in JavaScript by

Which of the following variables takes precedence over the others if the names are the same?

a) Global variable

b) The local element

c) The two of the above

d) None of the above

1 Answer

0 votes

Answer: B

Reason: In JavaScript, the local variable takes precedence over the global variable if the name of both local and global variables is the same.

Related questions

0 votes
asked Mar 24, 2021 in JavaScript by sharadyadav1986
0 votes
asked Mar 23, 2021 in JavaScript by sharadyadav1986