js面向过程
1.js面向过程
let counter = 1
counter = counter + 2
counter = counter + 3
counter = counter + 4
counter = counter + 5
console.log(counter ) //输出为15
2.面向对象
const counter = {
value: null,
init(v) {
this.value = v
},
inc(v) {
this.value
原创
2021-12-13 14:07:06 ·
1157 阅读 ·
0 评论