cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Community Tip - Learn all about the Community Ranking System, a fun gamification element of the PTC Community. X

Why I can not use 'return' keyword to stop script execution?

zhuwenxi
11-Garnet

Why I can not use 'return' keyword to stop script execution?

Why I can not use 'return' keyword to stop script execution? It should be supported in a javascript function.

1 ACCEPTED SOLUTION

Accepted Solutions

Hi,

It's how it works, to return a value you should use var result = "value";

If you want to execute script execution anyway you can use break and block combination:

end: {

// Your code here

// if you want to break here: break end;

//  More code here

}

View solution in original post

2 REPLIES 2

Hi,

It's how it works, to return a value you should use var result = "value";

If you want to execute script execution anyway you can use break and block combination:

end: {

// Your code here

// if you want to break here: break end;

//  More code here

}

It works perfertly. Thanks for your information.

Top Tags