Skip to content

Commit

Permalink
installing npm in our Events folder
Browse files Browse the repository at this point in the history
  • Loading branch information
Vivekkumar0412 committed Nov 18, 2022
1 parent b94d751 commit afce1d1
Show file tree
Hide file tree
Showing 37 changed files with 4,052 additions and 3 deletions.
8 changes: 5 additions & 3 deletions Events/eventt.js → Eventts/eventt.js
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,8 @@ console.log("hi there !!");
let fs = require("fs");
let EventEmitter = require("events");

let chalk = require("chalk")

let myEvent = new EventEmitter();
// console.log(myEvent);

Expand All @@ -13,13 +15,13 @@ myEvent.on("myName",(a,b)=>{
myEvent.emit("myName",9,9);

myEvent.once("dt",function(name,age,salary){
console.log(`Hi there I am ${name} my age is ${age} and my current salary is ${salary }`)
console.log(chalk.bgRedBright(`Hi there I am ${name} my age is ${age} and my current salary is ${salary }`))

// console.log(this)
console.log(chalk.greenBright("hi"))
})

myEvent.on("dt",function(name,age,salary){
console.log(`Hi there I am ${name} my age is ${age} and my current salary is ${salary }`)
console.log(chalk.bgYellow(`Hi there I am ${name} my age is ${age} and my current salary is ${salary }`))
// console.log(this)
})

Expand Down
72 changes: 72 additions & 0 deletions Eventts/node_modules/.package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit afce1d1

Please sign in to comment.