javascript - Can't print a method with es6 class
问题描述
Why does the code below not produce an output when logging showInstall
class crud_actions {
constuctor(second){
this.allitems_colection = 'main',
this.allitems_example = second
}
listall() { return this.allitems_example; }
}
var test = new crud_actions('solo');
var showinstall = test.listall();
console.log(showinstall);
解决方案
推荐阅读
- java - JDK11,安全策略不会传播到 ForkJoinPool 工作线程
- visual-studio-code - VSCODE。如何通过单击打开包含变量或 html 标记的文件?
- ios - 在 performDropWith 委托回调中访问源表视图
- c# - 更新(更新回退)具有子实体的实体列表的正确方法?
- php - 使用php将数据infile加载到oracle表中
- python - 通过使用 Python 计算行范围内的元素来创建新列
- python - 在循环中将一个列表的每个元素与第二个列表的四个元素相乘以获得新列表的函数
- drools - Drools 7.x 中“KnowledgeAgentConfiguration”属性的替代品是什么?
- python - 在 django 中从 rest API 运行 Python 脚本
- docker - 基于 Docker 的 graylog 权限