# Ridiculous problem I have

i'm not sure if this should go in bugs/glitches or this topic but if I make the script

in a custom block it works weird works the same as <[text] = [a space], but if I take those blocks and put them in the scripting area, make another script variable called text, set it to the wanted text, it works fine. please tell me why it will not work in a custom block. (and how to fix it)

If that (idk. But:)
Hbe you tried putting it in a "Call" reporter?
I once had this issue and putting it in there fixed it.

Oy.

You know, when Jens starts ranting about how some people think variables are the solution to every problem, I generally think he's sort of exaggerating, but this takes the cake. Did you really not think, while creating 26 script variables, one for each lower case letter, "There must be a better way to do this"?

The to lower case block is in the Strings library. But if you didn't know about that library, and you want to mess around with Javascript, you could just say

text.toLowerCase()


which is how the library block is implemented.

Moral #1: Javascript is a last resort. Almost anything you want to do, Snap! already gives you a way to do it. Learn Snap!. Don't think that because you know everything about Scratch, you know everything about Snap!.

Moral #2: If you're using variables for any purpose other than to hold a value, don't. There is for sure always a better solution.

Moral #3: If you're constructing a list of Booleans, you probably are using MAP when you should be using KEEP.

This is the quote of the year, no, not the year, it is the quote of the decade, IMHO. Can we please please please have the picture of the quote on the main Snap! website's (and the forum's, and manual's) splash screen.

I want to take out the JS block altogether. It's literally preventing people from learning to program. The benefits (letting folks who already know CS have it their way) don't justify the downsides (every kid thinks that JS is the secret to CS).

This is sooooo depressing.

I totally agree, Jens.

As Brian said: " Javascript is a last resort. Almost anything you want to do, Snap! already gives you a way to do it. Learn Snap*!*.**"

Thanks, but no, I don't think that would be a good idea. We don't want to pick fights.

P.S. Sorry, in retrospect I shouldn't have yelled at you. I was tired, but I should have waited. I'm not taking back anything I said, but I could have been more polite about it. And I'm supposed to be setting good examples around here.

Do you want to talk about how you thought up that approach? It seems really roundabout.

You could hide the JS block, like the codification blocks

not case sensitive

I used an alternative solution with keep, and had the same problem (just that it is more broken and reports false with anything you put there.)

But wouldn't that prevent the people who already know how to program Snap! but don't know JS, from learning JS?

And being honest, I am one of those many kids who don't know JS well, but love & know how to program with Snap!. I only know very little JS.

i know js i could teach you

you could

or you could only use the js block if you have enough non-js blocks (so that you could not write your whole program in js), but the libraries would still work

You can use the

block

does not work with the [] = [] block , only with the blocks in that library

oh you're right

Oh gosh you're right! I'm extra sorry now for being snarky. But this will work:

(if you turn case-independent search off).

it reports true if the input is a symbol (not letter) but we want it to report false, since symbols are not uppercase/lowercase. otherwise, it works.

Ah, I see. Well then,