Skip to content

Instantly share code, notes, and snippets.

View michaelchum's full-sized avatar

Michael Ho Chum michaelchum

View GitHub Profile
function go() {
var userId = prompt('Username?', 'Guest');
checkIfUserExists(userId);
}
var USERS_LOCATION = 'https://SampleChat.firebaseIO-demo.com/users';
function userExistsCallback(userId, exists) {
if (exists) {
alert('user ' + userId + ' exists!');