Skip to content

Commit

Permalink
Working build
Browse files Browse the repository at this point in the history
  • Loading branch information
stalgiag committed Feb 28, 2024
1 parent 43d06ef commit f3da0ef
Show file tree
Hide file tree
Showing 1,002 changed files with 55,995 additions and 2 deletions.
38 changes: 38 additions & 0 deletions src/content/reference/en/JSON/stringify.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
---
layout: '@layouts/reference/SingleReferenceLayout.astro'
title: stringify
module: Foundation
submodule: Foundation
file: src/core/reference.js
description: >
<p>From <a
href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/JSON/stringify">the
MDN entry</a>:
The JSON.stringify() method converts a JavaScript object or value to a JSON <a
href="#/p5/string">string</a>.</p>
line: 490
params:
- name: object
description: |
<p>:Javascript object that you would like to convert to JSON</p>
type: Object
itemtype: method
class: JSON
example:
- |-
<div class='norender'>
<code>
let myObject = { x: 5, y: 6 };
let myObjectAsString = JSON.stringify(myObject);
console.log(myObjectAsString); // prints "{"x":5,"y":6}" to the console
console.log(typeof myObjectAsString); // prints 'string' to the console
</code>
</div>
alt: This example does not render anything
chainable: false
---


# stringify
63 changes: 63 additions & 0 deletions src/content/reference/en/console/log.mdx
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
---
layout: '@layouts/reference/SingleReferenceLayout.astro'
title: log
module: Foundation
submodule: Foundation
file: src/core/reference.js
description: >
<p>Prints a message to your browser's web console. When using p5, you can use
<a href="#/p5/print">print</a>
and <a href="#/p5/console/log">console.log</a> interchangeably.</p>
<p>The console is opened differently depending on which browser you are using.
Here are links on how to open the console in <a
href="https://developer.mozilla.org/en-US/docs/Tools/Web_Console/Opening_the_Web_Console">Firefox</a>
, <a
href="https://developers.google.com/web/tools/chrome-devtools/open">Chrome</a>,
<a
href="https://docs.microsoft.com/en-us/microsoft-edge/devtools-guide/console">Edge</a>,
and <a
href="https://support.apple.com/en-ca/guide/safari/sfri20948/mac">Safari</a>.
With the <a href="https://editor.p5js.org/">online p5 editor</a> the console
is embedded directly in the page underneath the code editor.</p>
<p>From <a
href="https://developer.mozilla.org/en-US/docs/Web/API/Console/log">the MDN
entry</a>:
The Console method log() outputs a message to the web console. The message may
be a single <a href="#/p5/string">string</a> (with optional substitution
values),
or it may be any one or more JavaScript <a href="#/p5/object">objects</a>.</p>
line: 512
params:
- name: message
description: |
<p>:Message that you would like to print to the console</p>
type: String|Expression|Object
itemtype: method
class: console
example:
- |-
<div class='norender'>
<code>
let myNum = 5;
console.log(myNum); // prints 5 to the console
console.log(myNum + 12); // prints 17 to the console
</code>
</div>
alt: This example does not render anything
chainable: false
---


# log
Loading

0 comments on commit f3da0ef

Please sign in to comment.