-
Notifications
You must be signed in to change notification settings - Fork 26
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
2015年1月23日 D7 希望每日一题能继续,来发简单的。arguments类型转换。 #38
Labels
Comments
qingo
changed the title
希望每日一题能继续,来发简单的。argments类型转换。D7
2015年1月7日 D7 希望每日一题能继续,来发简单的。argments类型转换。
Jan 23, 2015
Array.prototype.slice.call(arguments); |
//arguments.slice();
汗
|
[].slice.call(arguments); |
function argments2array(){
return [].slice.call(arguments);
} 每日一水 |
火钳刘明function argments2array(){
Array.prototype.slice.call(arguments,0);
} |
qingo
changed the title
2015年1月7日 D7 希望每日一题能继续,来发简单的。argments类型转换。
2015年1月7日 D7 希望每日一题能继续,来发简单的。arguments类型转换。
Jan 23, 2015
return arguments |
function argments2array(){
return Array.prototype.slice.call(arguments,0);
} |
function argments2array(){ |
function test(){ |
|
qingo
changed the title
2015年1月7日 D7 希望每日一题能继续,来发简单的。arguments类型转换。
2015年1月23日 D7 希望每日一题能继续,来发简单的。arguments类型转换。
Jan 23, 2015
|
function arguments2array(){ |
function argments2array(){ |
@helloaspnet 好思路 |
玩点小花样吧,ES5来帮忙
或者ES6(不过V8都还不支持from方法)
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
把arguments转化为array类型。
case:
The text was updated successfully, but these errors were encountered: