Recently, I was trying to create a two-column table with multiple rows. I needed to iterate over a collection object and display its data in a table with two columns, something like the one shown below:
Value - 1 Value - 2 Value - 3 Value - 4 Value - 5 Value - 6 ...
After some web research regarding the use of the rowIndex property and the use of logical tags, I was able to implement the following code, which is at least free from scriptlet tags (although expressions do appear in some places for required logical evaluations):
tag > tag > - tag >
![devxblackblue](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![devxblackblue](https://www.devx.com/wp-content/uploads/DevX-1-150x68.png)
About Our Editorial Process
At DevX, we’re dedicated to tech entrepreneurship. Our team closely follows industry shifts, new products, AI breakthroughs, technology trends, and funding announcements. Articles undergo thorough editing to ensure accuracy and clarity, reflecting DevX’s style and supporting entrepreneurs in the tech sphere.
See our full editorial policy.
About Our Journalist
Charlie Frank
Charlie has over a decade of experience in website administration and technology management. As the site admin, he oversees all technical aspects of running a high-traffic online platform, ensuring optimal performance, security, and user experience.
View Author
![VP Climate](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![VP Climate](https://www.devx.com/wp-content/uploads/VP-Climate-300x171.jpg)
Harris’s VP choice may shape climate agenda
Noah Nguyen
July 26, 2024
5:45 PM
![AI Partnership](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![AI Partnership](https://www.devx.com/wp-content/uploads/AI-Partnership-300x171.jpg)
Salesforce and Workday announce AI partnership
Cameron Wiggins
July 26, 2024
5:18 PM
![WaveBL Digitization](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![WaveBL Digitization](https://www.devx.com/wp-content/uploads/WaveBL-Digitization-300x171.jpg)
Pil partners with WaveBL for eBL digitization
Rashan Dixon
July 26, 2024
1:48 PM
![Internet Hospital](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Internet Hospital](https://www.devx.com/wp-content/uploads/Internet-Hospital-300x171.jpg)
Musk activates internet in Gaza hospital
Cameron Wiggins
July 26, 2024
1:44 PM
![AI Cybersecurity Debate](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![AI Cybersecurity Debate](https://www.devx.com/wp-content/uploads/AI-Cybersecurity-Debate-300x171.jpg)
Experts debate AI impact on cybersecurity
Noah Nguyen
July 26, 2024
1:43 PM
![AI Stocks](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![AI Stocks](https://www.devx.com/wp-content/uploads/AI-Stocks-300x171.jpg)
Palantir and C3.ai: high-potential AI stocks
Rashan Dixon
July 26, 2024
11:35 AM
![Quantum Security](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Quantum Security](https://www.devx.com/wp-content/uploads/Quantum-Security-300x171.jpg)
Telefónica unveils new quantum security solution
Noah Nguyen
July 26, 2024
11:34 AM
![Tesla Roadster](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Tesla Roadster](https://www.devx.com/wp-content/uploads/Tesla-Roadster-300x171.jpg)
Musk updates Tesla Roadster production timeline
Cameron Wiggins
July 26, 2024
11:26 AM
![Report Workload](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Report Workload](https://www.devx.com/wp-content/uploads/Report-Workload-300x171.jpg)
Employees report AI increases their workload
Rashan Dixon
July 26, 2024
11:24 AM
![Online Privacy](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Online Privacy](https://www.devx.com/wp-content/uploads/Online-Privacy-300x171.jpg)
Protect your online privacy with VPN
Cameron Wiggins
July 26, 2024
11:24 AM
![Ryzen AI](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Ryzen AI](https://www.devx.com/wp-content/uploads/Ryzen-AI-300x171.jpg)
Amd announces Ryzen AI 9 HX 375
Noah Nguyen
July 26, 2024
11:19 AM
![Climate Hurdles](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Climate Hurdles](https://www.devx.com/wp-content/uploads/Climate-Hurdles-300x171.jpg)
US faces hurdles to meet climate goals
Cameron Wiggins
July 26, 2024
11:13 AM
![xAI Supercomputer](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![xAI Supercomputer](https://www.devx.com/wp-content/uploads/xAI-Supercomputer-2-300x171.jpg)
Elon Musk’s xAI launches Memphis supercomputer
Johannah Lopez
July 26, 2024
11:08 AM
![Open-Source Switzerland](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Open-Source Switzerland](https://www.devx.com/wp-content/uploads/Open-Source-Switzerland-300x171.jpg)
Switzerland mandates open-source software for government
Noah Nguyen
July 26, 2024
8:53 AM
![Reddit Google](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Reddit Google](https://www.devx.com/wp-content/uploads/Reddit-Google-300x171.jpg)
Reddit blocks most search engines except Google
Cameron Wiggins
July 26, 2024
8:46 AM
![Hottest Monday](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Hottest Monday](https://www.devx.com/wp-content/uploads/Hottest-Monday-300x171.jpg)
Monday sets record for hottest day
Johannah Lopez
July 26, 2024
8:02 AM
![IBM rises](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![IBM rises](https://www.devx.com/wp-content/uploads/IBM-rises-300x171.jpg)
IBM stock rises on strong Q2 earnings
Johannah Lopez
July 26, 2024
7:47 AM
![Wiz Declines](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Wiz Declines](https://www.devx.com/wp-content/uploads/Wiz-Declines-300x171.jpg)
Wiz declines $23 billion offer from Alphabet
Cameron Wiggins
July 26, 2024
7:23 AM
![Military Crackdown](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Military Crackdown](https://www.devx.com/wp-content/uploads/Military-Crackdown-300x171.jpg)
Military crackdown leaves 200 dead in Bangladesh
Johannah Lopez
July 26, 2024
7:19 AM
![Musk Congress](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Musk Congress](https://www.devx.com/wp-content/uploads/Musk-Congress-300x171.jpg)
Elon Musk attends Netanyahu’s address to Congress
Rashan Dixon
July 26, 2024
7:16 AM
![Tandem Drift](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Tandem Drift](https://www.devx.com/wp-content/uploads/Tandem-Drift-300x171.jpg)
Ai-powered GR Supras complete tandem drift
April Isaacs
July 26, 2024
7:11 AM
![Tech Pressure](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Tech Pressure](https://www.devx.com/wp-content/uploads/Tech-Pressure-300x171.jpg)
Mega-cap tech stocks under pressure
April Isaacs
July 25, 2024
5:45 PM
![Cybersecurity Certificate](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Cybersecurity Certificate](https://www.devx.com/wp-content/uploads/Cybersecurity-Certificate-300x171.jpg)
New IBM cybersecurity certificate at community colleges
April Isaacs
July 25, 2024
5:37 PM
![Qaptiva Quantum](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Qaptiva Quantum](https://www.devx.com/wp-content/uploads/Qaptiva-Quantum-300x171.jpg)
Eviden unveils Qaptivaâ„¢ quantum emulator for researchers
Johannah Lopez
July 25, 2024
5:29 PM
![Global Cybersecurity](data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw==)
![Global Cybersecurity](https://www.devx.com/wp-content/uploads/Global-Cybersecurity-300x171.jpg)
Telefónica Tech secures global BBVA cybersecurity deal
Cameron Wiggins
July 25, 2024
5:27 PM