Pętla JavaScript
for ([initialExpression]; [conditionExpression]; [incrementExpression])
statement
Larry Adah
for ([initialExpression]; [conditionExpression]; [incrementExpression])
statement
<template>
<div>
<b-form-checkbox
id="checkbox-1"
v-model="status"
name="checkbox-1"
value="accepted"
unchecked-value="not_accepted"
>
I accept the terms and use
</b-form-checkbox>
<div>State: <strong>{{ status }}</strong></div>
</div>
</template>
<script>
export default {
data() {
return {
status: 'not_accepted'
}
}
}
</script>
for(var i = 0; i < 6; i++) {
//This is a very simple loop template
}
for (var i = 0; i < cats.length; i++) {
if (i === cats.length - 1) {
info += 'and ' + cats[i] + '.';
} else {
info += cats[i] + ', ';
}
}
for (var i =0;i<1;i++){
}
var arr = [1, 2, 3, 4, 5];
arr.slice().reverse()
.forEach(function(item) {
console.log(item);
});