Wrox Programmer Forums
Go Back   Wrox Programmer Forums > Web Programming > JavaScript > Javascript
|
Javascript General Javascript discussions.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the Javascript section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old November 28th, 2003, 07:04 PM
Registered User
 
Join Date: Sep 2003
Posts: 9
Thanks: 0
Thanked 0 Times in 0 Posts
Default How do we exit from a function in JavaScrip ?

Hello all,
I wanna know how we exit from a function on our choice in javascript.
For example:
function abc(strtest){
  if (strtest="Abc"){
exit from funciton.(what statement do we write here to exit from a function in JavaScript ?)
}
     else{
continue execution.
}
Thanks in advance.
Misbah Ansari.

}

 
Old November 28th, 2003, 07:10 PM
planoie's Avatar
Friend of Wrox
 
Join Date: Aug 2003
Posts: 5,407
Thanks: 0
Thanked 16 Times in 16 Posts
Default

return;

If you want to return a value,

return <value>;

Peter
------------------------------------------------------
Work smarter, not harder.





Similar Threads
Thread Thread Starter Forum Replies Last Post
exit from a void function Necromancer26 C# 3 October 16th, 2012 09:06 AM
How can I pass a variable from php to Javascrip [email protected] PHP How-To 2 May 17th, 2007 06:50 AM
Error javascrip phuongdv ASP.NET 2.0 Professional 0 March 25th, 2007 10:36 AM
how to exit from function try.test.abc C# 2 January 11th, 2007 06:24 AM
checkbox validation on client side using Javascrip sansircar ASP.NET 1.0 and 1.1 Professional 0 October 17th, 2005 07:43 PM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.