JS 操作符整理[推荐收藏]
String OperatorA string is most often text, for example "Hello World!". To stick two or more string variables together, use the + operator.The variable txt3 now contains "What a verynice day!".To add a space between two string variables, insert a space into the expression, OR in one of the strings.".Conditional OperatorJavaScript also contains a conditional operator that assigns a value to a variable based on some condition.Syntax. If the variable visitor is equal to PRES, then put the string "Dear President " in the variable named greeting. If the variable visitor is not equal to PRES, then put the string "Dear " into the variable named greeting.
下载地址
用户评论