🤑 Join the Treehouse affiliate program and earn 25% recurring commission!

New No-Code Track! 🚀start learning today!

🌟 Dreaming of a bright future? 🎓 Ask about the Treehouse Scholarship program! 🚀

✨ Earn college credits in Cybersecurity, JS, HTML, CSS and Python

  • Treehouse Logo
  • Plans
    Chevron
    • For Individuals
    • For Businesses
    • For Schools
    • For Libraries
    • For Military
  • Library
    Chevron
    • All Courses
    • Tracks
    • College Credit
  • Techdegree
    Chevron
    • Overview
    • Front End Development
    • Full Stack JavaScript
    • Data Analysis
    • UX Design
    • Python
  • Community
    Chevron
    • Code Adventures
    • Discord
    • Forum
    • Success Stories
    • Treehouse Links
    • 100 Days of Code
  • Resources
    Chevron
    • Career Toolbox
    • CodeForward
    • Free Treehouse Near Me
    • Jobs
    • Blog
    • Support
    • About
  • For Individuals For Businesses For Schools For Libraries For Military
  • All Courses Tracks College Credit
  • Overview Front End Web Development Full Stack JavaScript Python Development Data Analysis UX Design
  • Code Adventures Discord Forum Success Stories Treehouse Links 100 Days of Code
  • Career Toolbox CodeForward Free Treehouse Near Me Jobs Blog Support About
  • Sign In
  • Free Trial
Instagram Twitter Facebook YouTube LinkedIn
    • Newest
      • Newest
      • Active
      • Unanswered
      • Featured
    • All Topics
      • All Topics
      • • General Discussion
      • • AI
      • • Android
      • • APIs
      • • Coding for Kids
      • • College Credit
      • • Computer Science
      • • CSS
      • • Data Analysis
      • • Databases
      • • Design
      • • Development Tools
      • • Digital Literacy
      • • Game Development
      • • Go Language
      • • HTML
      • • Java
      • • JavaScript
      • • Learning Resources
      • • Machine Learning
      • • No-Code
      • • PHP
      • • Professional Growth
      • • Python
      • • Quality Assurance
      • • React
      • • Ruby
      • • Security
      • • Swift
  • Nelson J
    Nelson J
    7,411 Points

    person variable without the 'var' keyword in the console.

    Posted April 15, 2019 1:32am by Nelson J
    Nelson J
    7,411 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    2 Answers

  • meghana Joshi
    meghana Joshi
    4,596 Points

    Don't we use let instead of var now

    Posted January 17, 2019 1:54pm by meghana Joshi
    meghana Joshi
    4,596 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

  • Abubakr Alhaj
    Abubakr Alhaj
    4,297 Points

    I understood the scope of the function but in the min. 1:23 it's very confusing because when you see the demonstration.

    Posted September 16, 2018 7:25am by Abubakr Alhaj
    Abubakr Alhaj
    4,297 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

  • Azul Bleu
    PLUS
    Azul Bleu
    Courses Plus Student 1,015 Points

    Isn't there times when what you want exactly is to override the global scope?

    Posted November 27, 2017 11:29am by Azul Bleu
    Azul Bleu
    Courses Plus Student 1,015 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

  • Shumin Zhou
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Shumin Zhou
    Full Stack JavaScript Techdegree Graduate 32,510 Points

    why is show the string Lilha, George than Lilha angain!!

    Posted August 25, 2017 10:38am by Shumin Zhou
    .a{fill-rule:evenodd;}techdegree seal-36
    Shumin Zhou
    Full Stack JavaScript Techdegree Graduate 32,510 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    2 Answers

  • Enemuo Felix
    Enemuo Felix
    1,895 Points

    Just really want to know if I'm on the same page with this

    Posted August 23, 2017 5:41pm by Enemuo Felix
    Enemuo Felix
    1,895 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

  • Ming Jun Lim
    Ming Jun Lim
    10,060 Points

    i'm a little bit confused

    Posted June 30, 2017 7:36pm by Ming Jun Lim
    Ming Jun Lim
    10,060 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

  • Michael Lambert
    Michael Lambert
    6,286 Points

    Accessing global scopes

    Posted June 18, 2017 8:28pm by Michael Lambert
    Michael Lambert
    6,286 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    4 Answers

  • Audra Ogilvy
    Audra Ogilvy
    3,142 Points

    The function finds the variable in the global scope?

    Posted June 11, 2017 11:54pm by Audra Ogilvy
    Audra Ogilvy
    3,142 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    4 Answers

  • Timothy Huxley
    PLUS
    Timothy Huxley
    Courses Plus Student 4,781 Points

    Are there any tools to give us warnings and help us avoid risky code?

    Posted January 19, 2017 10:49am by Timothy Huxley
    Timothy Huxley
    Courses Plus Student 4,781 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    2 Answers

  • Karl Pupé
    Karl Pupé
    6,718 Points

    Variable Scope - why Lilah, George and Lilah?

    Posted October 18, 2016 1:49pm by Karl Pupé
    Karl Pupé
    6,718 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

  • MICHAEL P
    MICHAEL P
    5,191 Points

    I need a simple explanation of global functions within JavaScript, please?

    Posted September 8, 2016 5:33pm by MICHAEL P
    MICHAEL P
    5,191 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    4 Answers

  • Abir Ahmed
    PLUS
    Abir Ahmed
    Courses Plus Student 8,616 Points

    Why by removing "var" of the functions make functions look for a variable in Global Scope?

    Posted May 22, 2016 8:03pm by Abir Ahmed
    Abir Ahmed
    Courses Plus Student 8,616 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

  • Mohammed Jammeh
    Mohammed Jammeh
    37,463 Points

    Accessing a variable inside a function..

    Posted March 26, 2016 10:01pm by Mohammed Jammeh
    Mohammed Jammeh
    37,463 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    4 Answers

  • Michal Janek
    seal-mask
    .a{fill-rule:evenodd;}techdegree seal-36
    Michal Janek
    Front End Web Development Techdegree Graduate 30,654 Points

    Why Lilah 3rd time?

    Posted March 2, 2016 7:08pm by Michal Janek
    .a{fill-rule:evenodd;}techdegree seal-36
    Michal Janek
    Front End Web Development Techdegree Graduate 30,654 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    2 Answers

  • Philip Bessa
    Philip Bessa
    5,396 Points

    Over-complicated? Why not rename a variable?

    Posted August 10, 2015 7:25pm by Philip Bessa
    Philip Bessa
    5,396 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    2 Answers

  • Durdona Abdusamikovna
    Durdona Abdusamikovna
    1,553 Points

    I need better explanation on SCOPE

    Posted April 13, 2015 2:06pm by Durdona Abdusamikovna
    Durdona Abdusamikovna
    1,553 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    14 Answers

  • Durdona Abdusamikovna
    Durdona Abdusamikovna
    1,553 Points

    Can someone suggest me any JavaScript Debugger ... ? I really want to see how each line of codes are running.

    Posted April 13, 2015 3:56am by Durdona Abdusamikovna
    Durdona Abdusamikovna
    1,553 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    3 Answers

  • Corey Standish
    Corey Standish
    14,835 Points

    Besides asking to have the basic lessons "Dumbed Down" even more, are there any tips on learning the basics?

    Posted March 19, 2015 12:00am by Corey Standish
    Corey Standish
    14,835 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    4 Answers

  • VIVIAN CENTENO
    VIVIAN CENTENO
    2,335 Points

    Code Challenge: Create a function named max()

    Posted January 9, 2015 4:18am by VIVIAN CENTENO
    VIVIAN CENTENO
    2,335 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    6 Answers

  • John Haas
    John Haas
    1,756 Points

    Scope question.

    Posted December 4, 2014 12:45am by John Haas
    John Haas
    1,756 Points
    • JavaScript
    • JavaScript Basics (Retired)
    • Creating Reusable Code with Functions
    • Variable Scope

    1 Answer

Posting to the forum is only allowed for members with active accounts.
Please sign in or sign up to post.

    Treehouse

  • About
  • Blog
  • Careers
  • Community
  • Stories
  • Shop
  • Contact
  • Gift Card

See Full Catalogue

Techdegree

  • Front End Web Development
  • Full Stack JavaScript
  • Python Development
  • Data Analysis
  • UX Design

Tracks

  • Learn to Code for Beginners
  • Beginning Python
  • Beginning SQL
  • Beginning Java
  • ...see more

Courses

  • JavaScript Basics
  • Intro to HTML & CSS
  • Python Basics
  • CSS Layout
  • ...see more

Explore

  • Plans
  • Affiliates
  • Perks
  • Free Treehouse Near Me
  • Treehouse for Libraries
  • Treehouse for Businesses
  • Twitter
  • YouTube
  • Facebook
  • LinkedIn
  • Instagram
Terms & Conditions | Privacy

© 2025 Treehouse Island, Inc.