Snap! Console Blocks (Part 2)

Continuing the discussion from Snap! Console Blocks (Part 1) - #103 by helicoptur.

Previous discussions:

Yes, but it is working for me, and you can recreate that easily. @helicoptur

Try it! Put

var a = 'moew';

into it, and it works fine. Then put


into it. It errors.

Okay, but did you try entering exactly

var a = 'something';


The program treats each command as one JavaScript Function block. You can't store variables.

why not???

Well, if you use var x = something, it's not declaring a global variable. it's declaring a script variable. so this is most likely a problem with your JS skills, not with the scripts.
(If you want to declare a global variable, remove the "var" keyword.)

"Body is too similar to what you recently posted" text

How and why not?

I hate not using var unless it's resetting a variable.

You can make a string:
var cat = 'meow'; alert(cat);

used to just be "why???".

I want a way to log to the log in the project.

It's more of a custom block pack and demonstration than a complete project judging by the title, so that probably won't be done.

Nah, I want that too.

How would I access the user console?

I don't get what you mean...

Console, like console.log and what not...