Guest User

Untitled

a guest
Jun 25th, 2018
84
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.25 KB | None | 0 0
  1. // For loop
  2. for (let i = 1; i < 5; i++) {
  3. if (i === 3) break
  4. }
  5. //-> 1 2 3
  6.  
  7. // For of
  8. for (let i of [1, 2, 3, 4, 5]) {
  9. if (i === 3) break
  10. }
  11. //-> 1 2 3
  12.  
  13. // For in
  14. for (let i in {name: 'John Deo', age: '20'}) {
  15. if (i === 'name') break
  16. }
  17. //-> name
Add Comment
Please, Sign In to add comment