Does Jscript on windows really exist?

  • Thread starter oldtobor
  • Start date
  • Tags
    Windows
In summary, the conversation discusses the existence and functionality of Jscript on Windows. Despite claims that it can be used as a scripting language from the DOS prompt, the individual has been unable to find a working example online and is beginning to doubt its validity. They have attempted various methods of running a simple alert function from a .js file but have encountered errors. Some believe that certain syntax may have been intentionally confusing in order to discourage usage of Jscript. However, it is still possible to use Jscript on any PC by saving the program as a .js file and running it from the command line or using cscript to see console results.
  • #1
oldtobor
132
0
does Jscript on windows really exist??

I read on various web pages that jscript can be used on windows as a scripting language directly form the DOS prompt. But I couldn't find ANY working example on the internet! even a simple alert("hello") put in a hello.js file doesn't work! It says an object is missing. Now I tried to find info on the web and after many attempts I am starting to doubt if this is just hype.

Can I really run A SIMPLE alert("www") in a hello.js file from the DOS prompt without any errors ? does this jscript thing really exist ?

(I also tried c:> cscript hello.js and others but to no avail... Thanks if anyone knows anything about this.
 
Computer science news on Phys.org
  • #2
Problem is the exact case of the string WScript.

(notice the WS...)


var a=new Array(10000);

for(i=1;i<10000;i++)a="www"+i;

WScript.echo (a[4877]);

for(i=999;i<1010;i++) WScript.echo (a);


It seems that some syntax is invented just to confuse; in vbs all cases work, in js not so, maybe to discourage a newbie to use js ... and then why didn't they maintain the alert() function ?

Anyways you can use this quick and dirty programming language on any PC right off the bat, just save the program as .js and run from the command line.
or run as cscript hello.js to see results as console.
 
  • #3


Yes, Jscript does exist on Windows as a scripting language. It is a Microsoft implementation of the ECMAScript standard, which is also used by JavaScript. Jscript can be used for scripting tasks on Windows, such as automating tasks or creating scripts for webpages.

However, it is possible that the example you found on the internet was not working due to syntax errors or incorrect usage. It is also important to note that Jscript is not commonly used in modern web development and has been largely replaced by JavaScript. So, while it does exist, it may not be as widely used as it once was.

If you are having trouble getting Jscript to work, I suggest consulting documentation or seeking help from experienced programmers. It is possible that the issue lies with your code or setup, rather than Jscript itself not existing.
 

1. Does Jscript on windows really exist?

Yes, Jscript is a programming language developed by Microsoft for use on Windows operating systems. It is a dialect of JavaScript and is used for web development and scripting on Windows platforms.

2. What is the difference between Jscript and JavaScript?

Jscript is a Microsoft-specific version of JavaScript, while JavaScript is a more general programming language used on a variety of platforms. Jscript was developed by Microsoft in the 1990s and is primarily used for web development on Windows operating systems.

3. Is Jscript still used?

Yes, Jscript is still used for web development and scripting on Windows platforms. However, its usage has decreased in recent years with the rise of other programming languages and frameworks.

4. Can Jscript be used for client-side scripting?

Yes, Jscript can be used for client-side scripting on Windows platforms. It is often used in conjunction with HTML and CSS to create dynamic and interactive web pages.

5. Is Jscript the same as VBScript?

No, Jscript and VBScript are two different programming languages developed by Microsoft. Jscript is based on JavaScript, while VBScript is based on Visual Basic. Both languages can be used for web development and scripting on Windows platforms.

Similar threads

  • Computing and Technology
Replies
3
Views
2K
Replies
14
Views
2K
Replies
2
Views
1K
Replies
7
Views
195
Replies
3
Views
1K
  • Computing and Technology
Replies
4
Views
1K
Replies
9
Views
3K
  • Computing and Technology
Replies
21
Views
2K
Replies
3
Views
4K
  • Computing and Technology
2
Replies
44
Views
3K
Back
Top