MCQs > IT & Programming > JavaScript > Difference between the two declaration methods below? var functionOne = function() { /* some code */ } function functionTwo() { /* some code */ }

JavaScript MCQs

What is the difference between the two declaration methods below? var functionOne = function() { /* some code */ } function functionTwo() { /* some code */ }

Answer

Correct Answer: functionOne is defined in-place (until that line, functionOne is undefined), whereas functionTwo is hoisted to the top of the scope and is available as a function throughout the scope.

Explanation:

Note: This Question is unanswered, help us to find answer for this one

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

JavaScript Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it