---
title: "变量优先级"
author: "djob2008"
date: "2009-11-27T11:14:00Z"
tags: []
slug: "untitled"
draft: false
lastmod: "2009-11-27T11:14:00Z"
id: 531010
url: "https://lovely.iteye.com/blog/531010"
---

形式参数名&gt;内置对象&gt;funname

```
//hi
function foo(foo){alert(foo);}
foo('hi');

//number
function foo(arguments){alert(typeof arguments);}
foo(100);

//object,js 中调用会导致引擎崩溃
function arguments(arguments){alert(typeof arguments);}
arguments();
```

 当形式参数名与未赋值的局部变量同名时候，取形式参数值

 当形式参数名与有值的局部变量同名时候，取局部变量数值