# JavaScript is like Python

**URL:** https://discourse.processing.org/t/javascript-is-like-python/44186
**Category:** Teaching
**Created:** [March 30, 2024, 3:29pm UTC](https://discourse.processing.org/t/javascript-is-like-python/44186 "2024-03-30T15:29:49Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![codeguppy](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/codeguppy/32/8322_2.png) [@codeguppy](https://discourse.processing.org/u/codeguppy)
#### Post date: [March 30, 2024, 3:29pm UTC](https://discourse.processing.org/t/javascript-is-like-python/44186/1 "2024-03-30T15:29:49Z")

</div>

To use p5.js you need to know JavaScript.

If you’re learning JavaScript as a second language (after Python), then this brief “JavaScript is like Python” article will demonstrate the JavaScript equivalents of some of the most popular concepts:

[https://codeguppy.com/blog/javascript-is-like-python/](https://codeguppy.com/blog/javascript-is-like-python/)

![](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/3/9/396a0b28461fe1e1e276929ea0bfd433fef578ed.jpeg)

---

<div class="post-metadata">

### Author: ![LangdonS](https://avatars.discourse-cdn.com/v4/letter/l/ebca7d/32.png) [@LangdonS](https://discourse.processing.org/u/LangdonS)
#### Post date: [April 5, 2024, 2:15pm UTC](https://discourse.processing.org/t/javascript-is-like-python/44186/2 "2024-04-05T14:15:00Z")

</div>

I would reccommend learning JavaScript as its own language.  
Don’t just learn python equivalents.  
JavaScript has WAY more features than Python.

Look at these cool JavaScript features:

```auto
var x = (a < b) ? 5 : 99;

```

```auto
var s = 7;
switch(s){
  case 7:
    println("Hello world!");
    break;
  default:
    println("Oh Well...");
}

```

You will discover similarities once you know both languages.
