Hey! If you want to learn how to code, but don’t know where to start, I’ll help you. We will start learning from the very beginning. Let’s figure out what a function is, how a string differs from a number, how to create conditionals and loops.
If you have any questions in the process, you can ask them in Telegram. I usually respond within an hour.
I assume that you do not understand anything at all about programming, so part of the assignment will be to simply rewrite the code by example. I will give the correct version and you will enter it until the characters match.
Lines with at least one error will turn red - they will need to be corrected.
Lines without errors will be green.
In other tasks, I will check the output on the screen and will not pay attention to how you achieved the correct result.
All programming is about telling the computer “what we want from it.” In other words, we give commands to the computer, and it executes them.
A message will appear on the screen
If you write another message inside
console.log(), then the message displayed by the computer will also change.
You can add one more text output command:
Another message on a new line will appear on the screen.
When you ask (or order) the computer to display text on the screen, it expects you to give it that text wrapped in quotation marks.
The quotes can be single, double, or oblique. Any option is suitable
console.log ('hello'); console.log ("hello"); console.log (`hello`);
In all cases, the same message will be displayed on the screen and we will see three lines:
hello hello hello
To better understand the theory, you must definitely practice. If you borrow in a mobile application, then under the terms of the tasks you will see a field for entering text and the number of the task to be checked.
The logic is this:
- we read the condition of task 1
- enter the code in the text field under the list of all tasks
- select (1) from the list of tasks to check
- press the “RUN” button
After running the code, the screen output will appear under the button. If there are any problems with the code, then their description will also be there.
If you make a mistake, then, depending on the type of task, either the lines inside the field for entering the code, or the lines of the screen output will be highlighted in red.
You need to display the string
Enter the command in the code editor
And click on the “RUN” button. Every symbol counts!
You need to print the string
Hello, world! Twice using different types of quotes and make sure that the result does not change.
Enter the commands in the code editor
console.log('Hello, world!'); console.log("Hello, world!");
Change the task for testing (2) and click “RUN”.
Print the string
Don’t forget to change the task before editing the code and running it.