Discuss Scratch

mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

I'm trying to make MMWS's code better using JSLint. JSLint doesn't understand lookbehinds though, so this line:
const mmwsRuleComponent        = /(?<!"(?:\\"|[^"])+);|;(?=[^"]*$)/g;
triggers [JSLint was unable to finish] Expected ‘:’ and instead saw ‘<’.
Not even //jslint-ignore-line works here. Is there a way to fix this?
pkhead
Scratcher
1000+ posts

Java/JavaScript Topic

mybearworld wrote:

I'm trying to make MMWS's code better using JSLint. JSLint doesn't understand lookbehinds though, so this line:
const mmwsRuleComponent        = /(?<!"(?:\\"|[^"])+);|;(?=[^"]*$)/g;
triggers [JSLint was unable to finish] Expected ‘:’ and instead saw ‘<’.
Not even //jslint-ignore-line works here. Is there a way to fix this?
What is Maria Mitchell Women of Science Symposium?

My brain has been trained by years of forum browsing to ignore signatures. Also you spelled concisely wrong. I'm now having an existensial crisis because of that. The world is now ending because of a spelling error.

Anyway I had no idea JSLint existed until I read your post so I can't help you. And I don't know how to complex regular expressions because it's hard to memorize all the rules if they're all just a bunch of symbols.
pkhead
Scratcher
1000+ posts

Java/JavaScript Topic

mybearworld wrote:

![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
What do you think this evaluates to? “true is false”
How does that evaluate to a string
mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

pkhead wrote:

mybearworld wrote:

![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
What do you think this evaluates to? “true is false”
How does that evaluate to a string
(anything)+[] turns (anything) into a string for reasons

Last edited by mybearworld (July 16, 2022 18:22:15)

mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

pkhead wrote:

Also you spelled concisely wrong. I'm now having an existensial crisis because of that.
oh nice i'm responsible for an extistential crisis

Last edited by mybearworld (July 16, 2022 18:25:29)

pkhead
Scratcher
1000+ posts

Java/JavaScript Topic

mybearworld wrote:

pkhead wrote:

mybearworld wrote:

![]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+!![]
What do you think this evaluates to? “true is false”
How does that evaluate to a string
(anything)+[] turns (anything) into a string for reasons
Where does the “ is ” come from
mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

pkhead wrote:

Where does the “ is ” come from
It's this:
([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]+([][[]]+[])[+!![]+!![]+!![]+!![]+!![]]+(![]+[])[!![]+!![]+!![]]+([][(![]+[])[+!![]]+(!![]+[])[+![]]]+[])[!![]+!![]+!![]+!![]+!![]+!![]+!![]+!![]]

Last edited by mybearworld (July 16, 2022 18:26:32)

mybearworld
Scratcher
1000+ posts

Java/JavaScript Topic

dhuls wrote:

(#701)
The names are way too confusing. so many people think this
class HelloWorld {
    public static void main(String[] args) {
        System.out.println("Hello, World!"); 
    }
}
Is JS, and this
console.log("Hello World");
is Java
Appearently even Scratch's syntax highlighting does? public and static are syntax highlighted as keywords!

Powered by DjangoBB