So, I decided to make a project that can convert characters to their lowercase/uppercase forms without using JavaScript. I already know that someone made something similar, but this is more effective.
CONVERT () TO ()
[scratchblocks]
(convert [world] to [lowercase v] :: operators)
[/scratchblocks]
In JavaScript:
[scratchblocks]
(call (JavaScript function \( [text]@delInput@addInput \) \{ [return text.toLowerCase()] \} :: operators) with inputs: [Hello World!]@delInput@addInput :: control)
[/scratchblocks]
★★★★★ Five stars! I like that this is JavaScript free. I've done this before as well, for a project.
Fun Fact:
Did you know:
Instead of using ScratchBlocks on the forums, you can use the feature "Script Pic..."? Just right-click a script and press "Script Pic..."!
<big>3 points here:</big>
___
* Why is there 2 topics?
* Why did you add
[quote="scratchmodification, post:1, topic:9602"]
*(C) 2021 ScratchModification.*
[/quote]
? You can't copyright stuff on Snap<i>!</i>.
* Nice project.
___
<big>`My Rating`</big>
___
★★★★★ Five stars! I like that this is JavaScript free. I've done this before as well, for a project.
___
<big>Fun Fact:</big>
___
Did you know:
Instead of using ScratchBlocks on the forums, you can use the feature "Script Pic..."? Just right-click a script and press "Script Pic..."!
Did you know:
There is another way to do this.
[details=Script]
![untitled script pic|464x500](upload://66rxvvZCmVa7tEfd09dERcnNk27.png)
[/details]
(For lowercase)
[details="Script"]
![untitled script pic (1)|454x500](upload://riqXcRo1yM9NHOBdZlETvH0t16Q.png)
[/details]
(For uppercase)
There's a much easier (and faster) way to do this...
[scratchblocks](map(<is[lowercase v]?::operators>@addInput::grey ring)over(split[Hello, world!]by(letter v)::operators)::list)[/scratchblocks]
(Warning: More than you probably wanted to know about this, coming up.)
Actually, anything you create, in any medium, is automatically copyright. Those copyright notices used to be required, but now they're just a convenient way to let people track down who owns a copyright.
If you want to let anyone do anything with your work, you can explicitly disclaim copyright with a notice along the lines of "I, joecooldoo, the author of this work, hereby disclaim copyright in it, placing it in the public domain."
You can have more or less restrictive licenses on things you write. Many works under copyright have very restrictive licenses, so you have to pay money just to see the work, and even then you aren't allowed to make a copy of it. (Hence the name "copyright.")
People who want to let people use their stuff often use a Creative Commons license, especially if the stuff isn't a computer program, for which other more specific licenses are more commonly used. There are several CC licenses; I think there are five possible Boolean conditions, but not all 25 combinations are possible.
The thing about Snap! is that it doesn't make sense to publish a project on our web site unless you want people to use it. If you don't publish it, of course you can keep it to yourself. The only thing that's non-obvious about publishing on the Snap! site is that, because we believe in remixing, we require the use of the CC-BY-NC-SA (or, if you prefer, CC-BY-SA) license.
I vote for "better." Using higher order functions makes code so much more readable! But you're focusing on a different question, which is how to parameterize a script. And the best answer to that is to make it a procedure (a custom block (yes, I know you know that, but other people may read this)) with inputs, rather than build the example into the script, whether via CALL or some other way.
Looking further at the code, I couldn't find any optimization issues that I would know how to fix, but I like how you directly use booleans in math functions (as in ). I didn't think anyone else did that.