Title: Uncaught SyntaxError in Javascript code
Last modified: August 24, 2016

---

# Uncaught SyntaxError in Javascript code

 *  [snaphappyme](https://wordpress.org/support/users/snaphappyme/)
 * (@snaphappyme)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/)
 * Developer toolbar has revealed a syntax error which is not being trapped.
 * **“Uncaught SyntaxError: Unexpected number”**
 * It relates to the variable `sweetcaptchaPluginVersion`.
 * You have assigned an invalid number. The variable should be in string format 
   I believe for the versioning style you are using. Two decimal points in a number
   is invalid.
 * `window.sweetcaptchaPluginVersion = 3.1.0;`
 * [https://wordpress.org/plugins/sweetcaptcha-revolutionary-free-captcha-service/](https://wordpress.org/plugins/sweetcaptcha-revolutionary-free-captcha-service/)

Viewing 7 replies - 1 through 7 (of 7 total)

 *  Thread Starter [snaphappyme](https://wordpress.org/support/users/snaphappyme/)
 * (@snaphappyme)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172389)
 * The issue comes from a linked file pulled in from your website.
 * **[https://www.sweetcaptcha.com/api/v2/apps/csrf/237219?ver=3.1.0:2](https://www.sweetcaptcha.com/api/v2/apps/csrf/237219?ver=3.1.0:2)**
 * So if you fix the issue on your server the plugin will stop reporting a javascript
   syntax error.
 * Refer line number 237219??
 *  Thread Starter [snaphappyme](https://wordpress.org/support/users/snaphappyme/)
 * (@snaphappyme)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172408)
 * Support is a little sluggish.. even posting to their email address gets no response
   except automated “we’ll be in touch message”.
 *  Plugin Contributor [Sweet Captcha](https://wordpress.org/support/users/sweetcaptcha/)
 * (@sweetcaptcha)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172415)
 * Hi snaphappyme,
    Sorry for the delay in our response,
 * it seems that the ‘2’ number is some how added on your site only,
    Could you 
   please check again for any conflict with a theme or a another plugin?
 * Best,
    Lara sweetCaptcha support team.
 *  Thread Starter [snaphappyme](https://wordpress.org/support/users/snaphappyme/)
 * (@snaphappyme)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172424)
 * I am using Twenty Fifteen theme.
 * I will look and post more info if I find any.
 *  Plugin Contributor [Sweet Captcha](https://wordpress.org/support/users/sweetcaptcha/)
 * (@sweetcaptcha)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172426)
 * Hi snaphappyme,
    Great!
 * Best,
    Lara.
 *  Thread Starter [snaphappyme](https://wordpress.org/support/users/snaphappyme/)
 * (@snaphappyme)
 * [10 years, 11 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172427)
 * Lara,
 * The **:2** on the end of the is the line number in the javascript file where 
   the issue is.
 * The debugger appends ‘:###” to end to guide you to line number.
 * If you **go back to the top of this posting** you will see the info you need.
 * It is a variable called **sweetcaptchaPluginVersion** that is being assigned 
   a STRING not a NUMBER and this is the error.
 * **window.sweetcaptchaPluginVersion = 3.1.0;**
 *  Thread Starter [snaphappyme](https://wordpress.org/support/users/snaphappyme/)
 * (@snaphappyme)
 * [10 years, 9 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172457)
 * Never resolved error or followed through support ticket. Poor customer support.

Viewing 7 replies - 1 through 7 (of 7 total)

The topic ‘Uncaught SyntaxError in Javascript code’ is closed to new replies.

 * ![](https://s.w.org/plugins/geopattern-icon/sweetcaptcha-revolutionary-free-captcha-
   service_d4dbea.svg)
 * [Sweet Captcha](https://wordpress.org/plugins/sweetcaptcha-revolutionary-free-captcha-service/)
 * [Frequently Asked Questions](https://wordpress.org/plugins/sweetcaptcha-revolutionary-free-captcha-service/#faq)
 * [Support Threads](https://wordpress.org/support/plugin/sweetcaptcha-revolutionary-free-captcha-service/)
 * [Active Topics](https://wordpress.org/support/plugin/sweetcaptcha-revolutionary-free-captcha-service/active/)
 * [Unresolved Topics](https://wordpress.org/support/plugin/sweetcaptcha-revolutionary-free-captcha-service/unresolved/)
 * [Reviews](https://wordpress.org/support/plugin/sweetcaptcha-revolutionary-free-captcha-service/reviews/)

## Tags

 * [javascript code](https://wordpress.org/support/topic-tag/javascript-code/)
 * [syntax error](https://wordpress.org/support/topic-tag/syntax-error/)

 * 7 replies
 * 2 participants
 * Last reply from: [snaphappyme](https://wordpress.org/support/users/snaphappyme/)
 * Last activity: [10 years, 9 months ago](https://wordpress.org/support/topic/uncaught-syntaxerror-in-javascript-code/#post-6172457)
 * Status: not resolved