There are 2 or 3 errors :
- To increment, you need
++
and not++1
- The
;
betweenfor
statement and{
can cause syntax errors - You need to close your curly brackets at the end
{}
More Related Contents:
- Encode URL in JavaScript?
- Get a range’s start and end offset’s relative to its parent container
- Changing CSS pseudo-element styles via JavaScript [duplicate]
- jsFiddle: no connection between html and js? Can’t call simple function from button?
- How to compare arrays in JavaScript?
- How to get the day of week and the month of the year?
- Named capturing groups in JavaScript regex?
- jQuery document.ready vs self calling anonymous function
- XMLHttpRequest status 0 (responseText is empty)
- ReferenceError: $ is not defined
- jquery – get text for element without children text
- OnClick Event binding in React.js
- Detect whether scroll event was created by user
- Intercept all ajax calls?
- How to determine whether an object has a given property in JavaScript
- How to detect when an iframe has already been loaded
- How do I check in JavaScript if a value exists at a certain array index?
- Are any JavaScript engines tail call (TCO) optimized?
- fetch() unexpected end of input
- break array of objects into separate arrays based on a property
- What is the difference between const and const {} in JavaScript
- Simulate the ‘new’ operator in JavaScript
- How to show live preview in a small popup of linked page on mouse over on link?
- Ajax – 500 Internal Server Error
- Find closest date in array with JavaScript
- How to render clipped surfaces as solid objects
- Find last index of element inside array by certain condition
- How do I find which JavaScript is changing an element’s style?
- Is it possible, in JavaScript, to detect when the screen is turned off in the Android & iOS browsers
- How to restore original object/type from JSON?