JSFiddle - React, Tailwind, and code Playground

by lavisha99

HTML

eee

JavaScript

/*
v1
1. divide the area into sections
2. go to first section
3. decide if there are any individuals
4. look for individuals
5. ensure having known of all the individuals
6. ask them for their age, sex, dwelling address, occupation, health status 
7. record information about their record an individual's age, sex, dwelling address, occupation, health status 
8. repeat for remaining sections
*/
/*
V2
1. declare the items to reocrd
2. assign the values to the item
3. Repeat for every item
*/
//using primitive
 
 let indiv1Name='John';
 let johnAge='34';
 let johnSex='Male';
 let johnAdd='10 mount street';
 let johnOcc='tutor';
 let johnHealth= 'Normal';
 
 let indiv2Name='Johny';
 let johnyAge='35';
 let johnySex='Male';
 let johnyAdd='12 mount street';
 let johnyOcc='tutor';
 let johnyHealth= 'Normal';
 
 console.log(indiv1Name);
 console.log(johnAge);
 console.log(johnSex);
 console.log(johnAdd);
 console.log(johnOcc);
 console.log(johnHealth);
 
 console.log(indiv2Name);
 console.log(johnyAge);
 console.log(johnySex);
 console.log( johnyAdd);
 console.log( johnyOcc);
 console.log( johnyHealth);

 
 
 //non-primitives
 
 let indivInfo=[{name: 'John',age: 34, sex:'Male', address:'10 mount street', occupation:'tutor', health:'normal' },{name: 'Johny',age: 35, sex:'Male', address:'12 mount street', occupation:'tutor', health:'normal'} ];
 
console.log(indivInfo);

/*
programming problem 2
1. Arrange 5 cards with random numbers from 1-7
2. Give 5 cards to player
3. arrange another 3 cards with a random number
4. make sure the player puts down the first and last card
5. display the remaining cards
6. store the cards in an array
2.*/
let randnum
randnum=Math.floor(Math.random()*7)+1;
console.log(randnum);

let card=[Math.floor(Math.random()*7)+1,...