Why is my javascript function not defined?



Why is my javascript function not defined?..

Answer / Peeush Prakash Saxena

There could be several reasons why your JavaScript function isn't defined. Ensure that you have correctly spelled the function name, and it's declared before being called. Also, make sure the function is not inside another function or a block unless intended to be a local variable. If you're using an IIFE (Immediately Invoked Function Expression), remember that the function will only exist within the scope of the expression.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More JavaScript Interview Questions

Explain “use strict” ?

1 Answers  


What is scope of variable in javascript?

1 Answers  


What is null in js?

1 Answers  


How can a particular frame be targeted, from a hyperlink, in javascript?

1 Answers  


Is javascript open source?

1 Answers  


What is the use of document object?

1 Answers  


What output will this program produce System.out.println(x+"+"+y+"="+(x+));

1 Answers  


What is callback in javascript?

1 Answers  


What do I need to code javascript?

1 Answers  


How to manage exception handling in javascript?

1 Answers  


Name the types of functions.

1 Answers  


How to write html code dynamically using JavaScript?

1 Answers  


Categories