Files
ClassContent/历届学生/fontendsix/每日课程/2021-10-29/index2.html
2024-09-27 02:06:13 +08:00

86 lines
1.7 KiB
HTML
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>js 数据类型 - 对象</title>
</head>
<body>
</body>
<script>
// object
// 1数据组成的规则
// 2: 编程中的思想 面向对象(oop)的变成 c++ java php python js 面向过程的编程 c
// 三大特征:封装,继承,多态
// 以前 objectjs 更新一个 class
// 如何定义一个对象?
// var 对象名 = {
// 属性名(key): 属性值(value)
// }
// var obj = new Object();
// obj.name = "F150";
// obj.color = "black";
// var obj = new Object({ name: "F150", color: "black" });
// var car = {
// name: {
// name1: 'F150',
// name2: '猛禽'
// },
// 11111: "test",
// speed: 6,
// color: "black"
// };
// console.log(car);
// setTimeout(() => {
// car.name = "demo";
// console.log(car);
// }, 3000)
// console.log(car.name.name2);
// console.log(car.11111);
// console.log( car["11111"] );
// car.start();
// car.stop();
// class car {
// start() {
// console.log("车辆启动了");
// }
// stop() {
// console.log("车辆停止了");
// }
// }
// class F150 extends car {
// name = "11111"
// test() {
// // console.log(this.name);
// }
// }
// class FLL extends car{
// }
// var me = new F150();
// me.test()
</script>
</html>