javascript - 如何在另一个函数中调用 Classes 函数
问题描述
这是类中的代码
addUser (id,name,email,password,mobile)
{
// Creating a new instance of User with the details provided
let newUser = new User(id,name,email,password,mobile);
// Adding the new instance of User into the Accounts array
this._accounts.push(newUser);
}
我需要调用 adduser name 我如何编写代码,如果我的代码错误但错误alrady
function(){
let i=0;
adduse(newuser(name))=i;
}
解决方案
推荐阅读
- git - 为什么github没有删除我移动的文件
- html - 使子元素不受父元素旋转的影响
- maven - 使用 settings.xml 中的变量,但使用 Maven 中的环境变量覆盖
- node.js - 从外部库记录到不显示“警告”日志
- c# - 如何在连接子句中使用 OR 条件使用 LINQ 查询
- wordpress - 发布帖子时对元数据执行 do_action 以更改其他帖子的元数据
- javascript - 为什么我需要用括号将属性传递给这个指令?
- bash - 更改每个子目录中每个文件的某些字符
- amazon-web-services - AWS Route53 ConflictingDomainExists:有没有办法将同一个 VPC 与共享同一个父域的多个私有托管区域相关联
- redis - Lettuce 连接的缩放限制