---
title: "Scope Chain"
author: "dmwdmc"
date: "2013-06-13T17:44:16Z"
tags: []
categories: ["Web前端"]
slug: "scope-chain"
draft: false
lastmod: "2013-06-13T17:46:32Z"
id: 1886284
url: "https://dmwdmc.iteye.com/blog/1886284"
---

作用域分为Global Scope, Local Scope.
with,catch will affect the Scope link.
global scope variable is one attribute  of  window. 
a var without define will be treated as a global variable. 

>   function getA(){ name="ddd"; }  alert(window.name);// 

"ddd" will popup.