I have the following code in javascript?
if ($(form).data('action') == "Edit") {
xx
} else if ($(form).data('action') == "Create"){
xy
} else if ($(form).data('action') == "Delete"){
xz
}
Is it possible for me to simplify this and also have some default path?
You could also create an object that contains your actions: