Skip to content

Ismail-ElAyadi/Command-Cli---Holidays-Country

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

15 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Command CLI - Holidays Country

Exercices BeCode Utilisation Node JS

Ligne de commande pour récupérer tous les jours de vacances d'un pays en fonction de son année :

$ npx @sma3il/holidays {Nom Du pays en Anglais} {Année en 4 chiffres}

Exemple :


$ npx @sma3il/holidays belgium 2020

Si l'année n'est pas donnée comme argument il prendra l'année en cours.

J'ai utilisé ceci :

npm link
Type one and only one time this line of code at the top of your file to import the little library we installed earlier:

const readlineSync = require("readline-sync");
Then you can do this:

let userName = readlineSync.question('Can you give me your name please?');
console.log("Hello " + userName);
It's not frequently used in real-life programs but it will be useful for simple exercises.
Example
const { getCode, getName } = require('country-list');

console.log(getName('IS')); // Iceland
console.log(getCode('Iceland')); // IS
console.log(getCode('Nowhere-to-be-found-land')); // undefined

About

Exercices BeCode Utilisation Node JS

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published