1.class的基本语法
class可以理解为是一个语法糖,将js只能通过构造函数创建实例的方法进行了补充
构造函数:
function Person ({ name, age18 }) {this.name namethis.age age
}
new Person({name: 张三})
Class类:
class Person {con…
Description
There are n bulbs that are initially off. You first turn on all the bulbs, then you turn off every second bulb.
On the third round, you toggle every third bulb (turning on if it’s off or turning off if it’s on). For the ith round, you toggl…
392. 判断子序列 - 力扣(LeetCode) 给定字符串 s 和 t ,判断 s 是否为 t 的子序列。字符串的一个子序列是原始字符串删除一些(也可以不删除)字符而不改变剩余字符相对位置形成的新字符串。(例如,…