bktfuture / JS-projects

Here I share my JS learning journey.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Learning JS project - Cazino Slot Machine.

Takeaways:

  1. Node.js prompt library

const prompt = require("prompt-sync")();

In order to get input from the user in terminal and store it in the variable, you need to:

const exampleVariable = prompt("What input you ask for: ");

this line will prompt the user for the value and then store it in teh const exampleVariabe.

  1. In order to test functions, you need to create a const with the value of function call and console log it.\

const test = testFunction(); console.log(test);

  1. while(true) is a way to prompt a user for specific kind of input untill they satisfy the requirments, if they satisfy you can break the loop with the return statement.

About

Here I share my JS learning journey.


Languages

Language:JavaScript 58.1%Language:CSS 26.2%Language:HTML 15.7%