Introduction to JavaScipt

来源:互联网 发布:2016上海程序员工资 编辑:程序博客网 时间:2024/06/06 03:44


1. What can we use JavaScript for?

  • make websites respond to user interaction
  • build apps and games (e.g.blackjack)
  • access information on the Internet (e.g. find out the top trending words on Twitter by topic)
  • organize and present data (e.g. automate spreadsheet work; data visualization)

2. SKILLs

// comments

confirm("Thank you!"); ——弹出对话框

prompt("How old are you?"); ——提示输入

console.log("string");——打印[strings]到控制台窗口

comparisons: >, <, >=,<=,===,!==. ——注意“不等于”和“等于”的表示符号

"strings".substring(start, end); ——提取子字符,字符串从0开始计数

var name=value; ——定义变量,变量名大小写敏感


(完)

0 0