How to get to the next line in command line?

How to go to the next line in command line?
For example:
I want to write a code of a javascript’s function, but I don’t know how to go to the next line, so I wrote it like so:

> function varExample()  { // A code }

But I want to write it like so:

> function varExample() {
// A code
}

You could try pressing shift+enter instead of just enter.

2 Likes

It worked. But do the three points affect the code?

Three points? Do you have a screenshot?

>function varExample() {
... }

I shouldn’t think they do. Can they be deleted? If not, try running some code; if it works, then they probably don’t affect the code.

1 Like

I used shift+enter and worked but now it doesn’t anymore,why?

Do you mean using it to create a new line doesn’t work? Try checking some of the settings for your terminal.

When I used it for the first time, it worked on vs code, notepad, social media websites and the terminal and almost everything. But now it doesn’t work anymore on my Windows 10, how can I fix this knowing that all my drivers are up to date as well as Windows?