How to compile and run your Javascript code online? Writing a simple program and compiling it on Repl.it

in hive-148441 •  5 years ago 

Hello Everyone!

Today we are going to discuss how to compile a simple program and run it on the online compiler. The compiler we are going to use is Repl.it . It is a very simple and user-friendly Online IDE. It can be used to run steemit scripts and other scripts (Any language) but we are going to try a java script code on it so let's try this .

  • Go to Repl.it

image.png

  • You can see that we can create an account to save our code and use it later as well. You can create an account if you have intentions to use it in further.

image.png

  • For now, I am not going to log in or create an account so I will just click on create a repl.

image.png

  • Now as you can see there are almost all languages available you are can use it for all languages.

  • We are going to run JavaScript so we will select JavaScript.

image.png

  • Now are ready to write our script.

image.png

  • For now we will just write a code in which we will store some String information in a variable and then we will print that on the console.

image.png

And that's it. Here we are storing the string type data in a variable named info and then we are printing it with the help of console.log() Method. Let's run the program and see if the piece of code works.

image.png

And it is working.

Script.

var info="Hi this is javascript compiler"; console.log(info);

Features

There are a lot of features. You can add different packages for your project , change the setting add files and much more.

image.png

For Example you can add steem.js file so you can run steemit scripts.

image.png

I will discuss the steemjs package in the upcoming posts.

It is enough for today. Take care and see you in the next post.

Authors get paid when people like you upvote their post.
If you enjoyed what you read here, create your account today and start earning FREE STEEM!
Sort Order:  
  ·  5 years ago (edited)

Thanks for this informative content piece, I agree Javascript is becoming important and its skills are considered highly prized in web application development these days.