NuSphere Forums Forum Index
NuSphere Forums
Reply to topic
Javascript 'let' operator not recognized


Joined: 08 Dec 2008
Posts: 35
Reply with quote
This question is basically due to annoyance than anything else.

I have been a NuSphere customer for quite a long time, and LOVE this product. I do quite a lot of work with Javascript and have noticed that some some elements are not recognized as valid Javascript, when in fact the code is correct.

For example, consider the following code snippet:


Code:
tooltip: {
                 pointFormatter: function() {
                     let start = new Date(this.start).toUTCString(),
                     end = new Date(this.end).toUTCString();
                     return `<span style="font-weight: bold">${this.name}<br></span><span style="font-weight: bold; font-size: 15px">Start: ${start}</span><br>End: ${end}`
                }
}



In this snippet, the IDE does not recognize the "let" operand, and also, the "`" in the return statement is defined as an error. Both of these are false errors. I have tried to look at as many options in my IDE to find out what and why this might be, but I cannot find anything.

Does Nusphere need to update its parser, or is there a better solution?

I know that the code is good, and will publish it, but it is extremely annoying seeing these errors in the IDE[/code]
View user's profileFind all posts by radi8Send private message


Joined: 27 Mar 2023
Posts: 48
Reply with quote
While I second your request for recognition of the let keyword and other additions to JavaScript's latest standards, I think that the ` char is not the ' char, and the first one that you're using is actually an apostrophe and NOT a single quotation, so the parser telling you it's an error might be doing the right thing, even if browser do accept it as a substitute for the single quote.
View user's profileFind all posts by ShoresOfNowhereSend private message


Joined: 27 Mar 2023
Posts: 48
Reply with quote
Current version 21018 still does not recognize the let keyword.
View user's profileFind all posts by ShoresOfNowhereSend private message


Joined: 06 Nov 2024
Posts: 4
Reply with quote
Have you tried completely reinstalling the IDE?
View user's profileFind all posts by AkinfiSend private message


Joined: 27 Mar 2023
Posts: 48
Reply with quote
No: even completely reinstalling version 21 build 21024 has no effect on this.
View user's profileFind all posts by ShoresOfNowhereSend private message
Javascript 'let' operator not recognized
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
All times are GMT - 5 Hours  
Page 1 of 1  

  
  
 Reply to topic