#If statement error
17 messages · Page 1 of 1 (latest)
You didn’t close your else if??
don't use , there
use ;
You closed the permSchema.create
Unless you’re big on nesting 
why are there so many , 
else if (!Data)
that isn't exactly the direct issue, you could close it after, which would make it show as "closed"
the main issue is you're using , to separate what should be statements, but the , makes them expressions
if is not a valid expression, it can only be a statement
you should be using ; to separate statements
it's probably in the wrong if
as stated above, (!Data) wasn't closed above it
it's under an else if with the above being data || Data, so inside !Data, data || Data must be false, since neither is reassigned
firgure out the right logic trees you have to write then
fix your indents too, it'll make the entire thing easier to visualize