ECMABytes - A javascript space to hang out!

Project URL:


A space where JavaScript coders can play and create challenges.


:spider_web: Lightweight and fast rendering based on Vue.js

:spider_web: 1990’s Retro UI

:spider_web: Strong authorization system, username (unique) and password (encoded) and a SECRET (check localStorage)

:spider_web: Fast and efficient data transfer due to remote sqlite database

:spider_web: Not open-source

:spider_web: Mini user tab on top-right corner, keeping record of eXperiencePoints and Likes

:spider_web: Codes as an attempt are privately stored, only code length is public

Instructions for challenges

  1. Start by typing in fx = args => { ... } for ES6, or function fx(args) { ... } for ES5. Note that function name must be fx
  2. Once your function definition is done, you can hit check syntax to verify
  3. After that, you can move on to the sample test cases designed by the author of the challenge
  4. If your function passes every tests, you are free to make a final submit

In case if you reloaded the page, it’s no problem. Your last code will be saved on every “Check syntax” hit :wink:

Instructions for adding tests cases

  1. Test cases exists in (input, output) pair
  2. You must add a minimum of 5 test cases
  3. Format for test values: "string", [a,r,r,a,y], 123
  4. You must add a code yourself in order to cross-verify your sample tests

Note that, test cases aren’t stored locally.


Awww, can you at least make the Vue part open-source? Like are you using the Vue CLI or client-side Vue along with Javascript?

Also, for the “isDigit” challenge, isn’t this an ideal solution:

fx = args => {
   return isNaN(args);

However, the tests failed.


shortest solution but it doesn’t pass the tests somewhy :frowning:

Yeah, same here. :cry:

Hi there,
May I ask how and where you are storing user information (e.g. usernames and passwords)? I don’t really like signing up for community projects not knowing if they have put information security and privacy first.

I can’t @khalby786 as the server part contains encoding algorithm. However, you can use inspector anytime for the client side vue code. :slight_smile:
Also, I’m not using Vue on server-side

1 Like

Note that isNaN checks if it is not a number.

Is this “isDigit” challenge?

yeah, !isNaN should be here


Ok, didn’t realize that until now.

Well @EddiesTech, I store the usernames and passwords in sqlite db. The passwords are encoded first and then stored. The encoding isn’t as simple as atob / btoa encoding.

Can you let us know the exact method? As we have said many times on this forum, you should be using a hashing and salting methods. I assume you are doing so.

I’m not using hashing / salting, as I was not aware of the fact that it is compulsory. Perhaps, I’m not much active on the forum. I think, I must implement it.
However, I’m using many cycles (~50) of encoding and string manipulation.

It’s not compulsory, but it’s the best method and really simple to set up (e.g. bcrypt uses hashing and salting) or you could use @ihack2712’s own library which supports a wide variety of methods :slight_smile:


See: A secure-, idiot proof hashing module


encoding doesn’t really help as it can be decoded. Encoding is even less secure than encryption (which btw shouldn’t be used either). Encoding and decoding happens without a key.

Hashing and salting should be used, as Eddie recommended your can use either bcrypt or my very own idiot proof hashing library:

const { hash, test } = require("ihacks-hash");

const passwordHash = hash("sha512", "my password", undefined, 1000);
const isPasswordValid = test(passwordHash, "my password");

if (isPasswordValid) console.log("Password is valid!");
else console.log("Password isn't valid!");

I agree with all the things you and @EddiesTech had said, but I can’t find some quickest way to update passwords in table. Do I have to use update command for taht?

Can you elaborate? 

Where do you save the passwords currently? A file? You should be using a database (MongoDB Atlas, deta are a few free examples)

How come you thought I’m using a file @EddiesTech ? A file can be easily viewed like “”. :joy:
I’m using sqlite3 npm module. And, now I want to know how to update the passwords (encoded -> hashed), apart from using update sql cmd?