Discuss Scratch

johnpocahontas
Scratcher
15 posts

Are these things the same?

I don't know whether this belongs here, but here goes. Are arrays in Javascript the same as lists in Scratch? I know there's gotta be multiple people on here that do Java too. I'm only a **beginner** though. Thanks!
jvvg
Scratcher
1000+ posts

Are these things the same?

This should probably go in Advanced Topics.
Anyway they are a similar concept, but they are significantly more complicated in JavaScript.
DigiTechs
Scratcher
500+ posts

Are these things the same?

johnpocahontas wrote:

I don't know whether this belongs here, but here goes. Are arrays in Javascript the same as lists in Scratch? I know there's gotta be multiple people on here that do Java too. I'm only a **beginner** though. Thanks!

Just a note

Jave ~= JavaScript

(meaning Java isn't JavaScript)

JavaScript is for the internet, is interpreted and is NOT Java.

Java is ‘compiled’ in the act of turning a .JAVA into a .CLASS
johnpocahontas
Scratcher
15 posts

Are these things the same?

jvvg wrote:

This should probably go in Advanced Topics.
Anyway they are a similar concept, but they are significantly more complicated in JavaScript.

Thanks! I'll try to find out more about these.

DigiTechs wrote:

johnpocahontas wrote:

I don't know whether this belongs here, but here goes. Are arrays in Javascript the same as lists in Scratch? I know there's gotta be multiple people on here that do Java too. I'm only a **beginner** though. Thanks!

Just a note

Jave ~= JavaScript

(meaning Java isn't JavaScript)

JavaScript is for the internet, is interpreted and is NOT Java.

Java is ‘compiled’ in the act of turning a .JAVA into a .CLASS

Thank you for that clarification. Now I know to use JavaScript all the time!
davidkt
Scratcher
1000+ posts

Are these things the same?

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
mythbusteranimator
Scratcher
1000+ posts

Are these things the same?

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
zubblewu
Scratcher
100+ posts

Are these things the same?

mythbusteranimator wrote:

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
it's a lot of languages (javascript included)
jji7skyline
Scratcher
1000+ posts

Are these things the same?

zubblewu wrote:

mythbusteranimator wrote:

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
it's a lot of languages (javascript included)
I think you mean Java !== Javascript
zubblewu
Scratcher
100+ posts

Are these things the same?

jji7skyline wrote:

zubblewu wrote:

mythbusteranimator wrote:

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
it's a lot of languages (javascript included)
I think you mean Java !== Javascript
are we talking java or javascript here?
LS97
Scratcher
100+ posts

Are these things the same?

jji7skyline wrote:

zubblewu wrote:

mythbusteranimator wrote:

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
it's a lot of languages (javascript included)
I think you mean Java !== Javascript
I'm pretty sure !== is a very special operator to test non-exactness (where you would check to see if 0 and false are the same thing in PHP).
In this case we want a simple != for C-based languages and <> for BASIC, both indicating inequality.

The ~= operator isn't always a part of every language, but in general it tests for similarity.
veggieman001
Scratcher
1000+ posts

Are these things the same?

Nothing is permanent.

Last edited by veggieman001 (July 17, 2013 03:14:23)

DigiTechs
Scratcher
500+ posts

Are these things the same?

LS97 wrote:

jji7skyline wrote:

zubblewu wrote:

mythbusteranimator wrote:

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
it's a lot of languages (javascript included)
I think you mean Java !== Javascript
I'm pretty sure !== is a very special operator to test non-exactness (where you would check to see if 0 and false are the same thing in PHP).
In this case we want a simple != for C-based languages and <> for BASIC, both indicating inequality.

The ~= operator isn't always a part of every language, but in general it tests for similarity.
The ~= operator in Lua means ‘not equal to’, which is equal to:

if not value == value then
MathWizz
Scratcher
100+ posts

Are these things the same?

LS97 wrote:

I'm pretty sure !== is a very special operator to test non-exactness (where you would check to see if 0 and false are the same thing in PHP).
Yes, that is the case, but you'd rather use it more often than not because, for one, it is faster because it does not type cast and secondly, reduces error because you aren't getting tripped up by simple cases such as 0 == ''.

Last edited by MathWizz (June 21, 2013 17:48:15)

johnpocahontas
Scratcher
15 posts

Are these things the same?

Gaaahhhh! I had no idea my thread would become a center for heated programming debate! Heh heh heh.
joefarebrother
Scratcher
500+ posts

Are these things the same?

zubblewu wrote:

mythbusteranimator wrote:

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
it's a lot of languages (javascript included)
And java included

!== is in JavaScript and a few other languages (but not java) which is basically a stricter version of !=, it tests weather two things have different value and type. For example, 1 != 1.0 is false because they have the same value even though they are different types, whereas 1 !== 1.0 is true. != is the opposite of == but !== us the opposite of ===.
MathWizz
Scratcher
100+ posts

Are these things the same?

…1 !== 1.0 is false… The ‘.0’ does nothing in JavaScript because everything is already a float internally.
jji7skyline
Scratcher
1000+ posts

Are these things the same?

Actually = is for assigning values, == is for testing equality. In PHP and JS at least.
Hardmath123
Scratcher
1000+ posts

Are these things the same?

johnpocahontas wrote:

Gaaahhhh! I had no idea my thread would become a center for heated programming debate! Heh heh heh.
Welcome to the ATs?
DigiTechs
Scratcher
500+ posts

Are these things the same?

jji7skyline wrote:

Actually = is for assigning values, == is for testing equality. In PHP and JS at least.
Same here in Lua.

And ~= is for checking inequality.
davidkt
Scratcher
1000+ posts

Are these things the same?

joefarebrother wrote:

zubblewu wrote:

mythbusteranimator wrote:

davidkt wrote:

DigiTechs wrote:

Jave ~= JavaScript
Don't you mean Java != JavaScript?
That's PHP.
it's a lot of languages (javascript included)
And java included

!== is in JavaScript and a few other languages (but not java) which is basically a stricter version of !=, it tests weather two things have different value and type. For example, 1 != 1.0 is false because they have the same value even though they are different types, whereas 1 !== 1.0 is true. != is the opposite of == but !== us the opposite of ===.
Okay guys.

!= is in: Python, Java, JavaScript, C++, PHP, Perl, Ruby, skip a few, C, C#, Actionscript… Almost every language there is. I've never seen !== or ~= or any of your other ones.

Powered by DjangoBB