SitePoint Sponsor |
|
User Tag List
Results 1 to 14 of 14
Thread: JavaScript vs JScript!
-
Jul 29, 2003, 10:15 #1
- Join Date
- Jul 2003
- Location
- Sacramento, CA
- Posts
- 330
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
JavaScript vs JScript!
I would say well enough that I know Javascript but I have been looking in ASP and ASP.net and I think I would like to use JScript since I know Javascript or are they absolutly different languages. Im pretty sure my choices are JScript, VBscript, C#, C++! But I would like to not have to learn a whole other language!
Sorry I posted in wrong forums belongs in ASP could someone delete or move?
-
Jul 29, 2003, 10:17 #2
- Join Date
- May 2000
- Posts
- 313
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
jscript is Microsofts version of JavaScript. There are some differences, but if you know JavaScript then you should have not trouble with jscript.
-
Jul 30, 2003, 12:02 #3
- Join Date
- Oct 2002
- Location
- Edinburgh, UK
- Posts
- 1,743
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, JavaScript can hardly be called a serious language. Though its syntax constructions are the same as in C like languages.
I think, the fact that you know JavaScript doesn't mean that you should learn JScript.NET and that it will be pretty easier. JScript.NET isn't similiar to JavaScripot, except syntax. JScript.NET is strongly-typed completely object oriented language as well as any other .NET language. So if you aren't familiar with concepts of OOP, you will hate to learn it.
And I highly recommend you to learn C#, it' the most powerful .NET language.
-
Jul 30, 2003, 12:27 #4
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Mika makes a good point. Don't confuse JScript with JScript.NET. Just by knowing JScript (by way of knowing JavaScript) doesn't mean you can pick up JScript.NET.
-
Aug 1, 2003, 00:39 #5
- Join Date
- Mar 2002
- Posts
- 327
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Make sure when you specify the language in your scripts that you specify Javascript rather than jscript as non-microsoft browsers won't understand your scripts.
NickAll4YourPC for all your PC needs. Custom software.
Websites. Web marketing. Training.
http://members.aol.com/nickjc67
-
Aug 1, 2003, 09:27 #6
- Join Date
- Jul 2003
- Location
- Sacramento, CA
- Posts
- 330
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes I looked at C# it seems to be some what the same as Javascript syntax wise! One thing I noticed is you have to define data type such as string,integer,boolean why do you not have to do this in Javascript! I tried using C# ans did not get very far!
-
Aug 1, 2003, 09:35 #7
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Javascript is a loosely-typed scripting language.
C# is a strongly-typed programming language.
The both use C-style syntax - but that's probably all they have in common.
-
Aug 5, 2003, 09:15 #8
- Join Date
- Jul 2003
- Location
- Sacramento, CA
- Posts
- 330
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
But they even have some of the same constructs
toString()
For Example
-
Aug 5, 2003, 09:17 #9
-
Aug 5, 2003, 22:50 #10
- Join Date
- Aug 2002
- Location
- Burpengary, Australia
- Posts
- 4,495
- Mentioned
- 0 Post(s)
- Tagged
- 1 Thread(s)
Originally Posted by beetle
-
Aug 6, 2003, 15:43 #11
- Join Date
- Jul 2003
- Location
- Sacramento, CA
- Posts
- 330
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
What do people mean by " loosely-typed " & " strongly-typed "?
-
Aug 6, 2003, 16:38 #12
- Join Date
- Jul 2002
- Location
- Dallas, TX
- Posts
- 2,900
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Well, the primary difference (AFAIK) is in how variable data types are handled. In javascript - although there are 7 or so different datatypes (Boolean, Number, String, Object, Function, Array, and Undefined. Some references will tell you that null is a type, but it's actually of type object) each one of them is implemented as an object, behind-the scenes. That's why even primitives, liks Strings, have methods (properties that are functions), such as indexOf and substring.
Strongly typed langauges require much more control and input from the programmer as to what the type of a variable is - when being declared, passed, received, or otherwise manipulated. Javascript doesn't require that you specify a string - you just use a string literal and javascript knows it's a string.
var myString = "some text";
That doesn't mean that javascript doesn't have a constructor for strings
var myString = new String( "some text" );
Basically, the type of the variable (in javascript) is implicit. For strongly -typed langauges, the variable type must be explicit.
I'm sure someone with more experience in a strongly-typed language can give you some better detail.
-
Aug 6, 2003, 16:53 #13
- Join Date
- Jul 2003
- Location
- Sacramento, CA
- Posts
- 330
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Thanx once again bettle you have provide so much help for me, in many different forums! So basically you have to specify!
In VB:
Dim i As Integer
C#:
int i;
JScript:
var i : int;
Basically asigning i as an Integer! Is this correct!
-
Aug 6, 2003, 17:33 #14
- Join Date
- Jan 2003
- Location
- Calgary, Canada
- Posts
- 2,063
- Mentioned
- 0 Post(s)
- Tagged
- 0 Thread(s)
Yes, it basically means, every variable has a type, a function for working with strings will not work with an integer, for example.
You must declare every variable, and what it's type is, and that variable cannot contain anything that is not of the assigned type.Who walks the stairs without a care
It shoots so high in the sky.
Bounce up and down just like a clown.
Everyone knows its Slinky.
Bookmarks