var javascript
var text = "";
var i;
for (i = 0; i < 5; i++) {
text += "The number is " + i + "<br>";
}
var javascript
var text = "";
var i;
for (i = 0; i < 5; i++) {
text += "The number is " + i + "<br>";
}
js var
var a;
console.log(a); // scrive in console "undefined" o "" a seconda del browser usato.
console.log('still going...'); // scrive in console "still going...".
js var
var a = 'A';
var b = a;
// è come dire:
var a, b = a = 'A';
var = {} js
//An array is a type of object intended to be only assigned numeric keys
var tmp = []; // or: var tmp = {}
tmp.one = 1;
JSON.stringify(tmp);
// array:
'[]'
// object:
'{"one":1}'
js var
console.log(a); // Genera un ReferenceError.
console.log('still going...'); // Non verrà eseguito.
js var
function x() {
y = 1; // Genera un ReferenceError in strict mode
var z = 2;
}
x();
console.log(y); // scrive "1" in console
console.log(z); // Genera un ReferenceError: z non è definita fuori dalla funzione x
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