# Translating Syntax Shorthand for Beginners?

**URL:** <https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995>\
**Category:** Beginners\
**Created:** [October 29, 2020, 3:56am UTC](https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995 "2020-10-29T03:56:16Z")\
**Posts on this page:** 2\
**Page:** 2

<div class="post-metadata">

**Author:** ![noel](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/noel/32/213_2.png) [@noel](https://discourse.processing.org/u/noel)\
**Post date:** [October 31, 2020, 11:09am UTC](https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995/21 "2020-10-31T11:09:15Z")

</div>

> [@glv](#):
>
> And P5.js version of this:

The way you did the shorthand here actually doesn’t appear confusing at all. It looks even cleaner.

---

<div class="post-metadata">

**Author:** ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)\
**Post date:** [October 31, 2020, 11:21am UTC](https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995/22 "2020-10-31T11:21:21Z")

</div>

> [@noel](#):
>
> The way you did the shorthand here actually doesn’t appear confusing at all. It looks even cleaner.

Same version with semicolons and single line:

`n=25;setup=_=>{createCanvas(w=500,w);x=y=0;while(y<w){r=int(random(2))*n;line(x+r,y,x+n-r,y+n);x+=n;if(x>w){y+=n;x=0}}}`

Same character count!

Enjoying the topic and your @noel posts here.

`:)`

[Previous page](https://discourse.processing.org/t/translating-syntax-shorthand-for-beginners/24995.md?page=1)
