-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMashgit.js
35 lines (33 loc) · 918 Bytes
/
Mashgit.js
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
//Mash
function Mash() {
return "You will live in a: " + getHome() + " and you will have: " + getChildrenCount() + " kids"+" and you'll drive in a: "+getCar();
}
console.log(Mash());
//Type of Homes
function getHome(){
let x = process.argv[2];
const randomly = ["Mansion","Apartment","Shack", "House", "Pool Boy"];
randomly.push(x);
let home = Math.floor(randomly.length * Math.random());
let homes = randomly[home];
return homes
}
//Number of child
function getChildrenCount(){
let x = process.argv[3];
let child = Math.floor(Math.random() * 100);
if (Math.floor(Math.random()* 2) == 1 ){
return child;
}
else {
return process.argv[3];
}
}
//Type of cars
function getCar(){
process.arg
const cars = ["Lambo","Convertible","box with wheels","mom car"];
let car = Math.floor(cars.length * Math.random());
let mycar = cars[car];
return mycar;
}