js中class私有属性和方法

135 阅读1分钟
<script>
    class Pepple{
       static age=20
       #count=10//私有属性
       _hi(){
          console.log("我是私有属性");
       }
       #say(){
          console.log("我是新私有方法写法");
       }
    }
</script>