学习目标:
- 今天学习了几个视频比较少,但还是想坚持记录博客,吼吼吼~
学习内容:
1.字符串常见方法
2.构造函数实现封装
3.原型对象prototype
4.数组扩展案例
5.constructor属性及应用
学习代码:
字符串常见方法:
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
</head>
<body>
<script>
/*截取字符串
const str = '今天又要做核酸啦'
console.log(str.substring(5, 7))*/
/*判断是不是以某个字符开头
const str = '我正在听pink老师讲课'
console.log(str.startWith('我'))*/
/*判断字符串中是否包含某个字符
const str = '张杰,亚洲歌王。'
console.log(str.includes('张杰'))*/
</script>
</body>
</html>
- 2023.8.3
学习计划:
- 明天把今天的补上,再把明天的学完
- 算法。。。