1. 首页
  2. 编程语言
  3. Javascript
  4. JS 操作符整理[推荐收藏]

JS 操作符整理[推荐收藏]

上传者: 2021-06-22 06:38:10上传 PDF文件 64.08 KB 热度 8次

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.

下载地址
用户评论