InterviewHubPRO
Section Overview
Q306

Question 306 of 521

Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)

59%
JavaScript Internals (521 Qs)•Part 5: ES6+ Modern Syntax, Classes, Modules & Destructuring (254 - 328)

How do you create an infinite loop

You can create infinite loops using for and while loops without using any expressions. The for loop construct or syntax is better approach in terms of ESLint and code optimizer tools,

javascript
  for (;;) {}
  while (true) {}