Skip to main content

Command Palette

Search for a command to run...

Hello Javascript with Google Dev Tools. How to run and learn Javascript Code using Google Dev Tools.

Published
1 min read
Hello Javascript with Google Dev Tools. How to run and learn Javascript Code using Google Dev Tools.
  • Download and install the Google Chrome browser if you don't already have it installed
  • Open the dev tools with F12 or by following the picture below

image.png

  • For better control open the dev tools in a separate window

image.png

  • Then you can fullscreen it and navigate to the sources menu

image.png

  • Then go to snippets

image.png

  • Click "New snippet" and name it whatever you wish. I'll name it "Hello Javascript"

  • Type in the following code:

function basicFunction(first, second, border, link) {    
    return border + first + link + second + border;
}

let var1 = 'Hello'
let var2 = 'Javascript'
let sides = '!!'
let between = ' '

let result = basicFunction(first=var1, second=var2, border=sides, link=between);

console.log(result)

Click the run icon/button

image.png

Notice the output in the console

!!Hello Javascript!!