Jscript notes, Jscript

Source: Internet
Author: User

Jscript notes, Jscript

1. Jscript cannot be used to write applications that run independently, and it does not have built-in support for reading and writing files. 2. Note that the original statement in the statement block ends with a semicolon, but the statement block itself does not end with a semicolon. 3. Note that, unlike C ++ and some other languages, Jscript does not regard statement blocks as a new range. Only functions create a new range. 4, Note:If you try to insert one multi-line comment into another, JScript cannot properly interpret the generated multi-line comment. Mark the end of the embedded multi-line comment */is considered to be the end of the whole multi-line comment. This means that the text embedded with multi-line comments is no longer considered as comments; correspondingly, it will be interpreted as JScript code and cause syntax errors.
5. If VarThe statement does not contain initialization variables. The variables automatically take the JScript value. Undefined. Although it is not safe, it is ignored in the declaration statement. VarThe keyword is a valid JScript syntax. In this case, the JScript interpreter gives visibility to the global scope of the variable. When a variable is declared at the process level, it cannot be used for a global range; in this case, the variable Declaration RequiredUse VarKeyword.
6. the type of JScript variables corresponds to the type of the values they contain. It is a free-type language. Its variables do not have a predefined type.
Operation Result
Value and string Addition Converts a value to a string.
Adding a Boolean value to a string Forcibly convert a Boolean value to a string.
Add a value to a Boolean Value Forcibly convert a Boolean value to a numeric value.

7. Jscript provides 11 internal (or "built-in") objects. They are Array, Boolean, Date, Function, Global, Math, Number, Object, RegExp, ErrorAnd StringObject.
Continue to supplement ,,,

How can I open a File of the JScript Script File type? I opened it in Notepad as a string of English letters.

Is there code for "speaking "?

Help. How can I use Jscript to write a random number string with 8 to 11 digits? Can I give the code?

<Script>
Var aa = Math. floor (Math. random () * 100000000)-1; // change the value of 10 digits to 10000000000 digits.
Alert (aa );
</Script>

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.