Uncaught SyntaxError: Unexpected token , in refCreateUser in firebase

I see the following error in the console. I am not sure how i can provide both email and password in ref.CreateUser

Uncaught SyntaxError: Unexpected token ,

This is function

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);
    }
  });
}

它不应该是:

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);
    }
});
链接地址: http://www.djcxy.com/p/8026.html

上一篇: Bing Maps API请求返回未捕获的SyntaxError:意外的令牌:

下一篇: 未捕获的SyntaxError:意外的标记,位于firebase中的refCreateUser中