Benjamin Papadakis
Benthinkalot

Benthinkalot

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

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

Benjamin Papadakis's photo
Benjamin Papadakis
·Dec 4, 2021·

1 min read

Subscribe to my newsletter and never miss my upcoming articles

  • 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!!
 
Share this