Code analysis

Posted 5 months ago by mDelshad

What happens in this code? , What exactly does it do?

preConfirm: function (email) {
                            return new Promise(function (resolve) {
                                setTimeout(function () {
                                    if (email === '[email protected]') {
                                        swal.showValidationError('This email is already taken.')
                                    }
                                    resolve();
                                }, 2000);
                            });
                        },

Please sign in or create an account to participate in this conversation.