Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in / Register
Toggle navigation
Y
yifu-study-front-share
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
CI / CD
CI / CD
Pipelines
Schedules
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
yifu-study
front
yifu-study-front-share
Commits
d1afb838
Commit
d1afb838
authored
Apr 26, 2022
by
zhangfangli
Browse files
Options
Browse Files
Download
Plain Diff
map和object
parents
5a927fd9
15c0586e
Pipeline
#15688
canceled with stage
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
0 additions
and
2 deletions
+0
-2
Map 和 Object.md
source/_posts/Map 和 Object.md
+0
-2
No files found.
source/_posts/Map 和 Object.md
View file @
d1afb838
...
...
@@ -268,10 +268,8 @@ Objects 和 Maps 类似的是,它们都允许你按键存取一个值、删除
Iterator 迭代器是一种接口,为不同的数据结构提供统一的访问机制,这个访问机制主要是遍历,我们知道,在数组、在对象、在类数组、在map、在set里面,都可以用for of或者扩展运算符来得到一个数组或者是遍历当前的数据结构,为什么能够遍历的原因就是因为存在这个Iterator 迭代器这个东西,所以我们可以用for of来提供一个统一的遍历,因此这个底层或者是Itrator它最初是为了for of而设计的。
为了给所有的
[
数据结构
](
https://so.csdn.net/so/search?q=%E6%95%B0%E6%8D%AE%E7%BB%93%E6%9E%84&spm=1001.2101.3001.7020
)
有一个统一的遍历接口,统一的访问机制,因此就产生了迭代器。
<br
/>
迭代器的特点:
-
按某种次序排列数据结构
-
为for of提供一个遍历支持
-
为不同的数据结构提供统一的访问机制(目的)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment