Discuss Scratch
- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
This is a forum for JS tutorials so people can add scratch extensions with maximum ability and make scratch have many more functions. This forum will teach JS basics, DOM, BOM, conditionals and loops, api, jQuery, and finally, scratch extensions. Anyone can post a tutorial.
- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
JS basics #1
JavaScript is a common programming language for web and game programming. It includes variables and functions. It is case sensitive.
You define variables like this:
You have to put the semicolon at the end.
You define functions like this:
or
There are also alert boxes that use the alert() function, but that will be described more in JS basics #2.
JavaScript is a common programming language for web and game programming. It includes variables and functions. It is case sensitive.
You define variables like this:
var a = "hi";
You define functions like this:
function myFunction() {
code
}var myFunction = function() {
code
}- StackMasher
-
Scratcher
100+ posts
Scratch JS Tutorial Forum
Ok but why would anyone with commitment read a bunch of random forum posts to learn something
If you want to teach people, make a book in word/libreoffice
If you want to teach people, make a book in word/libreoffice

Last edited by StackMasher (Oct. 1, 2017 15:57:55)
- TheAspiringHacker
-
Scratcher
100+ posts
Scratch JS Tutorial Forum
You don't need semicolons in JavaScript, but I still use them in order to avoid unexpected parses.
- Sheep_maker
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
There are many more ways to define functions:
Of course, each method has its own set of uses and downsides, so use whichever one you think works best
var myFunction=()=>{ code }; var myFunction=Function("code"); var myFunction=eval("(function() {code})"); var myFunction=[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]("code");
Last edited by Sheep_maker (Oct. 1, 2017 22:30:57)
- herohamp
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
There are many more ways to define functions:Of course, each method has its own set of uses and downsides, so use whichever one you think works bestvar myFunction=()=>{ code }; var myFunction=Function("code"); var myFunction=eval("(function() {code})"); var myFunction=[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]("code");
But we all know
var myFunction= function(){
}is the best
- ninjagolloyd
-
Scratcher
500+ posts
Scratch JS Tutorial Forum
arrows.There are many more ways to define functions:Of course, each method has its own set of uses and downsides, so use whichever one you think works bestvar myFunction=()=>{ code }; var myFunction=Function("code"); var myFunction=eval("(function() {code})"); var myFunction=[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]("code");
But we all knowvar myFunction= function(){
}
is the best
- ninjagolloyd
-
Scratcher
500+ posts
Scratch JS Tutorial Forum
JS basics #1there's much more to it
JavaScript is a common programming language for web and game programming. It includes variables and functions. It is case sensitive.
You define variables like this:You have to put the semicolon at the end.var a = "hi";
You define functions like this:orfunction myFunction() {
code
}There are also alert boxes that use the alert() function, but that will be described more in JS basics #2.var myFunction = function() {
code
}
the semicolon distinguishes between different command-function-whatchamacallems- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
You don't need semicolons in JavaScript, but I still use them in order to avoid unexpected parses.Actually, you do need them if you're doing more than one function or an if statement and one function.
- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
There are many more ways to define functions:I know. I just put a few in the forum post because those are the most used ones.Of course, each method has its own set of uses and downsides, so use whichever one you think works bestvar myFunction=()=>{ code }; var myFunction=Function("code"); var myFunction=eval("(function() {code})"); var myFunction=[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(![]+[])[!+[]+!+[]]][([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+([][[]]+[])[+!+[]]+(![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[+!+[]]+([][[]]+[])[+[]]+([][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[][(![]+[])[+[]]+([![]]+[][[]])[+!+[]+[+[]]]+(![]+[])[!+[]+!+[]]+(!![]+[])[+[]]+(!![]+[])[!+[]+!+[]+!+[]]+(!![]+[])[+!+[]]])[+!+[]+[+[]]]+(!![]+[])[+!+[]]]("code");
- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
I know, but some people may not know much about JS and may not understand it if I said that.JS basics #1there's much more to it
JavaScript is a common programming language for web and game programming. It includes variables and functions. It is case sensitive.
You define variables like this:You have to put the semicolon at the end.var a = "hi";
You define functions like this:orfunction myFunction() {
code
}There are also alert boxes that use the alert() function, but that will be described more in JS basics #2.var myFunction = function() {
code
}the semicolon distinguishes between different command-function-whatchamacallems
- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
Ok but why would anyone with commitment read a bunch of random forum posts to learn something
If you want to teach people, make a book in word/libreoffice
I decided to use the forum because people can ask questions about the topic and I can answer them. Also, other people can add tutorials.- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
Wow! There are so many posts in this thread! I know there are only 12, but this is the most out of any of my forum threads! My other one is a level code sharing forum for a level creator and has 3 posts all by me.
- StackMasher
-
Scratcher
100+ posts
Scratch JS Tutorial Forum
I don't think people adding tutorials to a single thread would be a good thing, it would be too cluttered. Asking questions could also be moved to separate threads, though for small problems I see your pointOk but why would anyone with commitment read a bunch of random forum posts to learn something
If you want to teach people, make a book in word/libreofficeI decided to use the forum because people can ask questions about the topic and I can answer them. Also, other people can add tutorials.
- AmazingMech2418
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
This forum is basically an archive of JS tutorials where anyone can add a tutorial and people can get a full understanding of JS.I don't think people adding tutorials to a single thread would be a good thing, it would be too cluttered. Asking questions could also be moved to separate threads, though for small problems I see your pointOk but why would anyone with commitment read a bunch of random forum posts to learn something
If you want to teach people, make a book in word/libreofficeI decided to use the forum because people can ask questions about the topic and I can answer them. Also, other people can add tutorials.
- linglee1
-
New Scratcher
1 post
Scratch JS Tutorial Forum
Check this Interactive jQuery Tutorial
http://net-informations.com/jq/default.htm
http://net-informations.com/jq/default.htm
Last edited by linglee1 (Nov. 19, 2018 05:56:19)
- TheAspiringHacker
-
Scratcher
100+ posts
Scratch JS Tutorial Forum
TypeScript is a compiled language.* You're supposed to convert it to JavaScript. Besides, JavaScript portability is a myth. Web developers need to support so many different browser versions that they need to use compilers such as Babel to convert modern JavaScript into versions of JavaScript that work on older browsers.JS Basics #1Then why is typescript not available on all devices? JavaScript is a great language.
Step 1: Don't
Please at least use Typescript (or now that it's a real thing, nearly any language will run on the web with wasm).
JS on its own is a terrible horrible no good very bad language.
In what world is JavaScript a “great language?” It suffers from dynamic and weak typing, weird `this` semantics, `null` and `undefined` errors, and a brittle move-fast-and-break-things ecosystem.
*Technically, the compiler/interpreter distinction is for PL implementations, not PLs themselves.
Last edited by TheAspiringHacker (Nov. 20, 2018 00:35:28)
- Jonathan50
-
Scratcher
1000+ posts
Scratch JS Tutorial Forum
Please at least use Typescript (or now that it's a real thing, nearly any language will run on the web with wasm).Most of those seem like weird edge cases, which are annoying, but not actual issues…
JS on its own is a terrible horrible no good very bad language.
Then why is typescript not available on all devices? JavaScript is a great language.Typescript is compiled to JavaScript so it can run (just about) anywhere JS does. (Ninja'd)
Last edited by Jonathan50 (Nov. 20, 2018 00:38:12)








