Zum Beispiel:
Code: Select all
let x = 5;
let y = 6;
let z = x + y;
document.getElementById("demoVariables").innerHTML = "The value of z is " + z;
//demoVariables is a paragraph block level element which is supposed to change to "The value of z is " and the value of z after that but for now is not being used or altered and I don't know why.Code: Select all
JavaScript Variables
In this example, x, y, and z are variables.
Ich lade diese .html-Datei in den Webbrowser und das einzige, was an den Webbrowser ausgegeben wird, ist Folgendes:
Code: Select all
JavaScript Variables
In this example, x, y, and z are variables.
Mobile version