JavaScript Function Behavior: Surprising Output Explained

👀 This JavaScript Code Looks Normal… But the Output Surprises Many Most people say “easy” when they see this 👇 But the last line makes many stop and think 🤔 function greet() {  return "Hello"; } console.log(typeof greet); console.log(typeof greet()); console.log(greet instanceof Object); No async. No arrays. No tricks. Still… the output is not what everyone expects. 🧠 Why this question matters Tests functions as first-class citizens Helps understand functions vs function calls Very common interview concept Looks simple but checks real JS fundamentals 💬 Your Turn Comment your answers like this 👇 Line 1 → ? Line 2 → ? Line 3 → ? Try answering without running the code 🤓 I will post the correct output + simple explanation in the evening 📌 Note: This post is to understand JavaScript behavior, not to confuse beginners #JavaScript #FrontendDevelopment #LearnJS #CodingInterview #Functions #TechWithVeera #WebDevelopment #100DaysOfCode

  • text

To view or add a comment, sign in

Explore content categories