← 输入框|github.com|刷新
Skip to content

Global Variable. #10

Open
Open

Description

@adityathebe

I see that we need to declare the variable "i" in the for loop using the keyword "var". example
for ( var i = 0 ; i <scores.length ; i++)

As I have learned in the previous lessons that if I don't declare a variable inside a function it becomes a global variable. What if I don't write var in front of i? Does that make it a global variable??

Activity

  1. bethrobson commented on Jul 22, 2015

    @bethrobson
    Owner

    Yes, it does!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions