javascript array
//create an array like so:
var colors = ["red","blue","green"];
//you can loop through an array like this:
for (var i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
javascript array
//create an array like so:
var colors = ["red","blue","green"];
//you can loop through an array like this:
for (var i = 0; i < colors.length; i++) {
console.log(colors[i]);
}
create array with number js
var foo = new Array(45); // create an empty array with length 45
return array javascript
function func() {
return [5, "string", {a: 7}];
}
take values from array javascript
for (const value of iterator) {
console.log(value);
}
get item in array from index
var valueAtIndex1 = myValues[1];
Copyright © 2021 Codeinu
Forgot your account's password or having trouble logging into your Account? Don't worry, we'll help you to get back your account. Enter your email address and we'll send you a recovery link to reset your password. If you are experiencing problems resetting your password contact us