Python微信订餐小程序课程视频
https://edu.csdn.net/course/detail/36074
Python实战量化交易理财系统
https://edu.csdn.net/course/detail/35475
一、定义类:使用的是funciton,因为在js中没有定义类的class语句,只有function.
■ 举例:
//定义一个Person类(通过类的无参构造函数定义类)
function Person(){}
var p = new Person();
p.name = '小明';
p.age = 12;
二、类的种类(系统类、自定义类)
(1)常见的系统类 String、Date、Math
1)String 类,字面量 ‘’ 举例: var str = ‘abc’;
✿ 补充:
'' 字符串
[] 数组
{} 对象
// 正则表达式
① length
② indexOf(string) 取得参数在字符串中出现的位置