moving all js docs under "javascript" (#368)
This commit is contained in:
committed by
Abhijith Chatra
parent
bc1e5f2522
commit
316d82a8d2
@ -6,7 +6,7 @@ Functions in the Bits library.
|
||||
|
||||
The binary numeral system represents numeric values using values 0 and 1. This is how almost all modern computers store data. Each 0 or 1 digit is called a binary digit, or bit for short.
|
||||
|
||||
The Bits library includes functions for bit-level manipulation of integers. In the [Touch Develop editor](/js/editor), click `bits` to see the following bit functions:
|
||||
The Bits library includes functions for bit-level manipulation of integers. In the [Touch Develop editor](/javascript/editor), click `bits` to see the following bit functions:
|
||||
|
||||
## Bitwise and, or, and xor functions
|
||||
|
||||
@ -63,5 +63,5 @@ bits `->` shift right unint32 (x : [Number](/reference/types/number), bits : [Nu
|
||||
|
||||
### See also
|
||||
|
||||
[statements and operators](/js/statements), [math functions](/js/math), [Number](/reference/types/number)
|
||||
[statements and operators](/javascript/statements), [math functions](/javascript/math), [Number](/reference/types/number)
|
||||
|
||||
|
@ -2,10 +2,10 @@
|
||||
|
||||
Break statement; exit a for or while loop.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
Exit a [while](/js/while) or [for](/reference/loops/for) loop before the loop is complete.
|
||||
Exit a [while](/javascript/while) or [for](/reference/loops/for) loop before the loop is complete.
|
||||
|
||||
### Touch Develop syntax
|
||||
|
||||
@ -29,5 +29,5 @@ for (let i = 0; i < 10; i++) {
|
||||
|
||||
### See also
|
||||
|
||||
[for](/reference/loops/for), [while](/js/while)
|
||||
[for](/reference/loops/for), [while](/javascript/while)
|
||||
|
||||
|
@ -2,14 +2,14 @@
|
||||
|
||||
How to call a function in your code.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
Type a function name in your code to call an existing [function](/js/function) in your script.
|
||||
Type a function name in your code to call an existing [function](/javascript/function) in your script.
|
||||
|
||||
### Call a function
|
||||
|
||||
1. In the Touch Develop editor, click a line of code to open the on-screen [Code Keyboard](/js/editor).
|
||||
1. In the Touch Develop editor, click a line of code to open the on-screen [Code Keyboard](/javascript/editor).
|
||||
|
||||
2. Click `code` to see the functions in your script.
|
||||
|
||||
@ -59,5 +59,5 @@ To see a list of the functions in a script, open the script and then click `scri
|
||||
|
||||
### See also
|
||||
|
||||
[function parameters](/js/functionparameters), [create a function](/js/function), [return statement](/js/return)
|
||||
[function parameters](/javascript/functionparameters), [create a function](/javascript/function), [return statement](/javascript/return)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
A function with inputs and outputs.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
To add a **functions** to your script, click the `script` button, then click the `+` `add new function` button
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
A note in code.
|
||||
|
||||
### @parent js/statement
|
||||
### @parent javascript/statement
|
||||
|
||||
|
||||
A comment is a line of code that contains text, usually an explanation or a note. All comments are ignored during script execution.
|
||||
@ -59,10 +59,10 @@ When you want to uncomment your code, click the `if false then` statement in you
|
||||
|
||||
### Library and function comments
|
||||
|
||||
* Use [comments](/js/comment) at the beginning of a library to describe the library
|
||||
* Use [comments](/js/comment) at the beginning of a [function](/js/function) to describe a function. The comment will appear in the help area of the Touch Develop editor when you insert the function
|
||||
* Use [comments](/javascript/comment) at the beginning of a library to describe the library
|
||||
* Use [comments](/javascript/comment) at the beginning of a [function](/javascript/function) to describe a function. The comment will appear in the help area of the Touch Develop editor when you insert the function
|
||||
|
||||
### See also
|
||||
|
||||
[markdown syntax](/js/markdown), [Touch Develop editor](/js/editor)
|
||||
[markdown syntax](/javascript/markdown), [Touch Develop editor](/javascript/editor)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Repeat code a preset number of times.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
Repeat code a fixed number of times.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
How to define a function with input and output parameters.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
A function is a unit of code that performs a specific task and returns a result.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
How to use parameters to pass info in and out of an function.
|
||||
|
||||
### @parent js/function
|
||||
### @parent javascript/function
|
||||
|
||||
|
||||
A [function](/js/function) can have multiple input parameters and/or a single output parameter. The parameters must be one of the supported variable [types](/js/types).
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Run code based on a condition.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
Conditionally run code depending on whether a [Boolean](/reference/types/boolean) condition is true or false.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
An image for the @boardname@ screen.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
An *Image* is a matrix of pixels to show on the [LED screen](/device/screen)
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Libraries are scripts with functions that you can use in other scripts.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
Libraries are scripts with functions that you can use in other scripts. For example, `game` is a library of game-related functions that you can use in your scripts.
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Functions in the math library.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
The math library includes math related functions that you can use with [Numbers](/reference/types/number).
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
An integer number.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
A *Number* is an integer such as `42` or `-42`. More precisely, a *Number* is a signed 32-bit integer (two's complement).
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Built-in operators.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
### to be removed: has been combined into [statements and operators](/js/statements)
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
How to publish scripts.
|
||||
|
||||
### @parent js/contents
|
||||
### @parent javascript/contents
|
||||
|
||||
|
||||
Scripts that you create are periodically saved in the cloud, but only published scripts can be seen by other people. Once you publish a script, other people can run your script, post comments on it, tweak and re-publish it, or rate your script with a heart.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Exit a function.
|
||||
|
||||
### @parent js/statement
|
||||
### @parent javascript/statement
|
||||
|
||||
|
||||
The return statement exits a [function](/js/function) and returns a value to the code that called the function.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
What is the script id? #docs
|
||||
|
||||
### @parent js/contents
|
||||
### @parent javascript/contents
|
||||
|
||||
|
||||
the *script id* is a unique identifier that is given to each [published](/js/publishing) script. This way you can share your scripts with other people.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Statements, operators, and libraries.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
TouchDevelop functions include statements and operators.
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
string-related functions.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
The following string related functions are available in Touch Develop for the @boardname@:
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
a piece of text.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
A *String* is a sequence of characters. For the @boardname@, ASCII character codes 32 to 126 are supported; letters, digits, punctuation marks, and a few symbols. All other character codes appear as a ? on the [LED screen](/device/screen).
|
||||
|
||||
|
@ -2,7 +2,7 @@
|
||||
|
||||
Repeat code in a loop while a condition is true.
|
||||
|
||||
### @parent js/language
|
||||
### @parent javascript/language
|
||||
|
||||
|
||||
Repeat code while a [Boolean](/reference/types/boolean) `condition` is true.
|
||||
|
Reference in New Issue
Block a user