Learn to Code via Tutorials on Repl.it!

← Back to all posts
Jaxit Tutorial
Codeverse (61)

Hello and Welcome to the one and only Jaxit Tutorial. I will teach you how to use Jaxit. First of all, thank you for reading this tutorial.

Now, time to begin Jaxit learning!
Jaxit is a Javascript Library.

What is Jaxit?

Jaxit is a library that makes a usuable console in the browser.

How to start your HTML or JS Module File

<!-- CSS -->
<link rel="stylesheet" href="https://jaxit.codeverse.repl.co/lib/jaxit.css">

<!-- JS -->
<script src="https://jaxit.codeverse.repl.co/lib/jaxit.js"></script>
<!--or-->
<script src="https://jaxit.codeverse.repl.co/lib/jaxit.min.js">
</script>

And with ES6 Modules...

import {createJaxit} from 'https://jaxit.codeverse.repl.co/lib/jaxit.module.js';

//or

import {createJaxit} from 'https://jaxit.codeverse.repl.co/lib/jaxit.module.min.js';

How to initalize your Jaxit Console

I preferred ES6 modules.

import {createJaxit} from 'https://jaxit.codeverse.repl.co/lib/jaxit.module.js';

//make jaxit obj

const jax = createJaxit();

jax.init();
jax.defaultStyle();
//I added defaultStyle because some people want their console to look a bit different.

Send Console Message

//ifbreak is if the text will break after the print line
jax.print(text, ifbreak, color);

/* "color" can be like this:
  #hhhhhh
  rgb(val1, val2, val3)
  hsv(val1, val2, val3)
*/

Send User Input

jax.scan((userResponse) => {
  // what you want the program to do after the user gives a response.
}, text, textcolor, usertextcolor, ifint);

Clear the Console

jax.clear();

Delay a Message or Action

//you can have a decimal number for the second parameter.
jax.delay(() => {

}, numofseconds);

Change console color

jax.changeConsoleColor(newcolor);

Change console font

jax.changeConsoleFont(newfont);

Change Console Location

/*Can have:
top,
bottom,
left,
right,
fullscreen
*/
jax.changeLocation(location);

How to use Scan

It is really simple. In Python and other languages that have the interactive console, you press enter.
Same with Jaxit.

Thank you very much!