use log instead of console
This commit is contained in:
@@ -47,7 +47,7 @@ Certain functions are intrinsic to the program and cannot be overridden. They’
|
||||
- **Example**:
|
||||
```js
|
||||
this.delay(_ => {
|
||||
console.log("3 seconds later!")
|
||||
log.console("3 seconds later!")
|
||||
}, 3)
|
||||
```
|
||||
|
||||
|
||||
@@ -7,7 +7,7 @@ Docstrings are set to the symbol `prosperon.DOC`
|
||||
|
||||
```js
|
||||
// Suppose we have a module that returns a function
|
||||
function greet(name) { console.log("Hello, " + name) }
|
||||
function greet(name) { log.console("Hello, " + name) }
|
||||
|
||||
// We can attach a docstring
|
||||
greet.doc = `
|
||||
@@ -21,7 +21,7 @@ return greet
|
||||
```js
|
||||
// Another way is to add a docstring object to an object
|
||||
var greet = {
|
||||
hello() { console.log('hello!') }
|
||||
hello() { log.console('hello!') }
|
||||
}
|
||||
|
||||
greet[prosperon.DOC] = {}
|
||||
|
||||
@@ -49,7 +49,7 @@ return {
|
||||
This will cause prosperon to launch a 500x500 window with the title 'Hello World'. In your ```main.js```, write the following:
|
||||
|
||||
```
|
||||
console.log("Hello world")
|
||||
log.console("Hello world")
|
||||
|
||||
this.delay(_ => {
|
||||
this.kill();
|
||||
|
||||
Reference in New Issue
Block a user