我在控制台中看到以下错误。我不知道如何在ref.CreateUser中提供电子邮件和密码
未捕获的SyntaxError:意外的令牌,
这是功能
function so_passwd() {
var email = $("#so_email").val();
var password = $("#so_pass").val();
ref.createUser({
email,
password
}, function(error) {
if (error === null) {
console.log("User created successfully");
} else {
console.log("Error creating user:", error);
}
});
}
答案 0 :(得分:0)
不应该是:
function so_passwd(){
var email = $("#so_email").val();
var password = $("#so_pass").val();
ref.createUser({
"email": email
"password": password
}, function(error) {
if (error === null) {
console.log("User created successfully");
} else {
console.log("Error creating user:", error);
}
});