0

I was just messing around as a new javascript programmer and decided to make a bank-like withdraw/deposit program, and I came out with this error. I know it's not the best looking but, I try:)

Couldn't find a way to post my code here, I tried Ctrl+k, but no success. I put it on pastebin: http://pastebin.com/3Ji4tSn9

2
  • use jsfiddle.net to show your code Commented Feb 26, 2014 at 23:53
  • 1
    I haven't gotten a chance to test it out fully, but comparing a string to an array is probably not what you want, try str.toLowerCase() == "yes" and simialr Commented Feb 26, 2014 at 23:54

1 Answer 1

3
return('Have a good day!');

Exactly what the error says, you have a return that is not inside a function.

Did you maybe mean alert('Have a good day!');, judging by the rest of the code?

Sign up to request clarification or add additional context in comments.

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.