SitePoint Sponsor

User Tag List

Results 1 to 14 of 14

Hybrid View

  1. #1
    Under Construction Poop_Shoot's Avatar
    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?

  2. #2
    SitePoint Addict
    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.

  3. #3
    SitePoint Wizard Mike Borozdin's Avatar
    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.

  4. #4
    SitePoint Addict
    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.

    Nick
    All4YourPC for all your PC needs. Custom software.
    Websites. Web marketing. Training.
    http://members.aol.com/nickjc67

  5. #5
    Web-coding NINJA! silver trophy beetle's Avatar
    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.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  6. #6
    Under Construction Poop_Shoot's Avatar
    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!

  7. #7
    Web-coding NINJA! silver trophy beetle's Avatar
    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.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  8. #8
    Under Construction Poop_Shoot's Avatar
    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

  9. #9
    Web-coding NINJA! silver trophy beetle's Avatar
    Join Date
    Jul 2002
    Location
    Dallas, TX
    Posts
    2,900
    Mentioned
    0 Post(s)
    Tagged
    0 Thread(s)
    Ya - some of that real common stuff you will see in both - and many other places as well.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  10. #10
    ********* Wizard silver trophy Cam's Avatar
    Join Date
    Aug 2002
    Location
    Burpengary, Australia
    Posts
    4,495
    Mentioned
    0 Post(s)
    Tagged
    1 Thread(s)
    Quote Originally Posted by beetle
    C# is a strongly-typed programming language.
    As is JScript and every other .NET language out there so don't think you can get away with anything

  11. #11
    Under Construction Poop_Shoot's Avatar
    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 "?

  12. #12
    Web-coding NINJA! silver trophy beetle's Avatar
    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.
    beetle a.k.a. Peter Bailey
    blogs: php | prophp | security | design | zen | software
    refs: dhtml | gecko | prototype | phpdocs | unicode | charsets
    tools: ide | ftp | regex | ffdev




  13. #13
    Under Construction Poop_Shoot's Avatar
    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!

  14. #14
    "Of" != "Have" bronze trophy Jeff Lange's Avatar
    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

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •