JavaScript (JS) It is a powerful language, but JavaScript (JS) can not go to operate the database alone. We need to know that its output syntax is 3, this is alert (""), Confirm (""), and Prompt (""). Variable, var a=1000;var b=10.5;var C=d; This writing is wrong, because the write "D" is undefined, the computer takes it as a variable, and then found in the execution "D" is undefined, so reported the error, the correct way to write "D" in single quotation marks or double quotation marks. Alert (A+B) Here is not the literal a+b, it means that the value of a to add the value of B, var a= "" "Var b=10.5 alert (a+b) This situation Plus is a concatenation effect, the result is 100010.5. A=parseint (a); This is a delegate to an integer, parsefloat (a) which is a turn decimal. var a=prompt ("Enter a number"), Var b=promt ("Enter another Number"), (note that whatever the user enters is a string). Then turn to an integer in the Operation var sum=parseint (a) +parseint (b); alert (sum) and output. var A=100;var b=12;alert (A/b) will get 8.33333 (endless 3) except for the infinite, but in int a=100;int b=12;a/b will get 8, after the decimal is not, no rounding, this is a strong type, regardless of subtraction is an integer. Alert (a%b) This represents a÷b not divisible by the words of the remainder to be taken. In these operations, an equal sign is an assignment, two are equal, and three are identical. The last one is the ternary operation var c=a==b? " OK ":" on "//condition? satisfies the conditional return value: The conditional return value is not met. Basic knowledge of language.
JavaScript (JS) Language basics