Rohit Rairohitrai.hashnode.dev·Aug 29, 2024Comprehensive Guide to Iteration ,Iterables, and Iterators in PythonIntroduction Iteration is a fundamental concept in Python, allowing you to loop over data structures like lists, tuples, and dictionaries. Understanding how iteration works, along with the concepts of iterables and iterators, is crucial for writing e...1 likePython
webismewebisme.hashnode.dev·Jul 11, 2024Symbol ExampleSymbol.iterator: const iterableObject = { data: [1, 2, 3], [Symbol.iterator]() { let index = 0; return { next: () => { if (index < this.data.length) { return { value: this.data[index++], done: false }; } e...symobol
Elom Emmanuelscansio.hashnode.dev·Jul 3, 2024TypeScript | Java Iterable ImplementationsIntroduction TypeScript and Java are two popular programming languages that are often used in different contexts: TypeScript in the world of web development and Java in enterprise and Android development. Despite their differences, both languages pro...1 likeiterable object
Davies Nzandaviesdev.hashnode.dev·Sep 2, 2023How to use Iterables' in pythonWhen working with Python, you might often hear the term "iterables," but what exactly are they, and why should you care? In this article, we'll break down the concept of iterables, explore their significance in memory management, delve into their imp...43 readsiterable object
Mohammed Asadullah Sayeedasdsyd.hashnode.dev·Mar 18, 2023JavaScript Collections - Iterations and DestructuringIteration let x = [1, 'b', a => a + 1]; x.length = 6; for(let i = 0; i<x.length; i++){ console.log(`x: ${x[i]} of type ${typeof(x[i])}`); } Output: in iteration The in keyword skips the undefined entries //i here takes the index values for(cons...94 readsJavaScript
Akash S Panickarmochatek.hashnode.dev·Feb 19, 2023Iterators in PythonOne of the key features of Python is its support for iterable objects and iterators. In this article, we will take a closer look at what they are and how they can be used. Iterable Object An iterable object in Python is an object that can be iterated...47 readsiterator
위영민youngmin.hashnode.dev·Aug 27, 2022[JS 딥다이브] Iterable 객체개요 JS 개발을 하다보면, Iterator, Array-like 같은 키워드를 볼 수 있고, 이런 자료형이어야 작동하는 프로세스들을 볼 수 있었을 것이다. JS ES6+ 에는 새로운 문법이나 Built-in Object 뿐만 아니라, protocols(표현법들)도 추가되었다. 이 protocol은 일정 규칙만 충족한다면, 어떠한 객체에서 의해서도 구현될 수 있다. 이러한 프로토콜은 2가지가 있다. Iterable protocol Iter...77 readsJavascriptiterable object