I feel confused

I completed the Grasshopper App and now I wanted to code more but I feel confused what i even learned :smile: I downloaded the program eclipse on my pc and tried to write a easy code and nothing came out I needed to write system.out.println (”hello”) and not that what I have learned in your app so what a program do you use or what a language did I even learn :joy:


Ps: the app is very good I loved to complete it and thx for helping :smile:

i think they said Javascript

Grasshopper is teaching JavaScript which is a different language from Java. If you want a quick way to play with JavaScript on your computer, try right clicking on this post (or anywhere in the main window of your internet browser). In Chrome, there should be an option to “inspect”. This will bring up developer tools. In the “Console” tab, you can input JavaScript commands, but it may be tricky to do any multi-line functions. In the “Sources” tab, you can go to “Snippets”, and create a new little program. There should be an option to run your code in the bottom right.

Here is a post about some of the functions written for Grasshopper. It means that some functions, like drawBox(), pickRandom(), and print() are specific to Grasshopper.

Java: System.out.println("hello");
JavaScript: console.log("hello");



Then what’s the use if i can not apply !! I dont want to learn for grasshopper… I learn real javascript and how to implement it. App starts with drawBoxes that most probably does not exist at all in real javascript… !!

Sololearn is far better at least it starts with real technique and tell the learner where to implement !!

leaving Hopper :frowning:

I have completed many topics but the basic is not clear. Like where to write and how to execute !! I dont think writing just the codes will give output like adding or something must be necessary.

i am new to programming and don’t know where to write and how to execute and what to add extras !!

It sounds like you’re wondering how to run code outside of the app. Here’s a short post on how to play around with JavaScript in your browser.

If you want to experiment more with animations (or non-animation things too), you can try the animations playground.


as you said… Then what’s the use if i can not apply !! I dont want to learn for grasshopper… I want to learn real javascript and how to implement it. App starts with drawBoxes that most probably does not exist at all in real javascript… !!

Sololearn is far better at least it starts with real technique and tell the learner where to put codes and how to see it working in real life.

Frustated … :frowning:

1 Like

I am new to coding, and Grasshopper has been fun.
To have a better understanding of coding and how it is related to Grasshopper,
I downloaded Android studio to make the connection.
I could not find much connection between what I have learnt and Android studio.
There wasn’t any “Var” or the “Console.log” for me to relate to.
(And the Android studio, although it should be very simple and convenient, I was lost.)

So, how can Grasshopper be related to coding with the coding programs out there in the market.
What is a better coding program to code in after learning Grasshopper.

I am very new to coding, so my questions may be naive.

Thank you

You were likely being prompted to create a Java program in Android Studio. This is different from JavaScript, so there isn’t a var or console.log().

Heather has a post about using VS Code to make JavaScript projects or using JSFiddle to experiment.


A post was merged into an existing topic: Started from the Top explainer

I have been trying to use javascript on other sources to see if it would work. But I would just get errors when i run it. I am looking at a lot of examples and see a lot of <> with something in-between before the coding etc… So here are my questions.

What does<> mean and why do i need it?
Am i required to know any other language to get javascript to run?
Where can I solely use Javascript?

Any help at all will relief my frustration, so thanks for your service

The <> are called “HTML tags” and they’re used to format webpages. You can run JavaScript code without knowing other languages by using the console in your internet browser, like Chrome. Some of the code used in Grasshopper is not built into JavaScript, but are actually JavaScript functions that we made and included in the app. You can create your own versions of these functions. For example,

function print(x) {
print('Now I can print');

Below is a more in-depth explanation to each of your questions.

The <> you see are HTML tags. These are used when creating a webpage. If you’re trying to write JavaScript on an online tool and you want to see some kind of output on the screen, either text or images, you’ll use these to format your output in a way the internet browser can understand. There is usually a start and end tag, just like parentheses, except an end tag will have a forward slash in it: <tag>The thing being tagged</tag>

If you reply to this post, you can try out some html tags to format your text:

  • Bold: <b>This will be bolded text</b>
  • Italic: <i>This will be italicized text</i>
  • Strikethough: <s>This text will be striked out</s>

There are lots of types of tags. If you’re using Chrome on a desktop, right click on this webpage and click “View Page Source”, you’ll see the tags used to format this website. It’s a bit overwhelming, but if you just look at the first few lines:

<!DOCTYPE html>
<html lang="en" class="desktop-view not-mobile-device  ">
    <meta charset="utf-8">
    <title>I feel confused - Issues - Grasshopper Support</title>
    <meta name="description" content="I completed the Grasshopper App and now...">
    <meta name="discourse_theme_ids" content="1">
    <meta name="discourse_current_homepage" content="latest">
    <meta name="author" content="">

It starts by saying, “This is an html document”. Then there’s a start tag for <html> with extra info included in the tag. Inside of that <html> section, there’s a <head> section, and inside that, there are things tagged with <meta> and <title>. If you look at the text that’s tagged with <title>, you’ll notice it’s exactly the text that is on this internet tab. Now, I’ll show you something cool.

Right click on the webpage again, and then select “Inspect”. This will bring up the developer tools if you’re using Google Chrome. There are several tabs at the top of this section, but the ones to notice are “Elements”, “Console”, and “Sources”. Make sure you’re on “Elements”. If you scroll all the way to the top of the code, you’ll see the same stuff that was in the Page Source. The <!DOCTYPE html>, then the html tag, then the <head> section. The <head> will probably be collapsed/hidden. Just tap the little triangle and it will expand the code. Inside there, if you scroll down about 10 lines, you’ll see the <title> tag again. Try double clicking the text inside and editing it. When you press enter, the text on your tab will change. This isn’t affecting the content for other people using the webpage, only you will see the change. In fact, if you hit Refresh, it will go back to the original because your browser is reloading the data from the original source (or a copy stored somewhere else).

Now click on the Console tab on the developer tools. You can run JavaScript here, but remember that it doesn’t know about any custom Grasshopper functions, like drawBox, pickRandom, or print. If you do try to print('hi'), it will open the “print this page” window. If you’ve made seen the lessons in Fundamentals II, you might already know about console.log(). This will do what print() does in the app. Type console.log('hi') in the console and press enter, it will write out hi, just like you’d hope. In case you’re wondering, the undefined at the end is the return value from console.log() because console.log() doesn’t actually return a value.

The console is a nice place to try out JavaScript commands, but it’s not great if you want to make several lines of code (you can use shift+enter, but that’s not great). Instead, go over to the Sources tab. On this page, you may have to look for the “Snippets” tab (next to Page, Filesystem, Overrides, Content scripts, Snippets, >>). Click on “New snippet”, and now you can create a JavaScript program, run it, and save it. The Run button is in the bottom right corner of the editor window (where your code is). You can save your code and name it too. It will probably be named “Script snippet #1” by default.


1 Like