4.3 For In Loop

4.3 For In Loop

For In Loops goes through the properties of an object.


let car = { color: 'Hot Red', engine: 'Powerhouse69' }; let carDetails = ""; for (let p in car) { carDetails += (p + " "); } // carDetails = "Hot Red Powerhouse69"

Previous Section

Next Section

Copyright © 2021 Code 4 Tomorrow. All rights reserved. The code in this course is licensed under the MIT License. If you would like to use content from any of our courses, you must obtain our explicit written permission and provide credit. Please contact classes@code4tomorrow.org for inquiries.