mcse Posted May 2, 2014 Share Posted May 2, 2014 (edited) Hey Guys I m new learning javascript, I Wrote basic code however not working any help please function Hello(){ var con = confirm("Do You want to go to Google " ?);if(con === true){ location = "http://www.google.com";} else { location.reload();}}Hello(); Edited May 2, 2014 by mcse Link to comment Share on other sites More sharing options...
Ingolme Posted May 2, 2014 Share Posted May 2, 2014 You have a question mark outside of the string which would cause a syntax error. Link to comment Share on other sites More sharing options...
thescientist Posted May 2, 2014 Share Posted May 2, 2014 any modern web browser should have developer tools / an error console. They will show syntax / runtime errors. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now