首页
话题
动态
专家
文章
作者
公告
更多
积分规则
登录 或 注册
首页
话题
动态
专家
文章
作者
公告
积分规则
发表新帖
发表新帖
Is it better coding practice to define variables outside a foreach even though more verbose?
前端
未结
关注
12
2200
栀梦
2020-12-10 10:39
In the following examples:
the
first
seems more verbose but less wasteful of resources
the
second
is less verbose bu
12条回答
[愿得一人]
(楼主)
2020-12-10 11:40
Follow a simple rule while declaring variables
Declare it when you need it for the first time
0
讨论(0)
查看其它12个回答
发布评论:
提交评论
加载中...
验证码
看不清?
提交回复
热议问题