-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathfunction.js
More file actions
38 lines (30 loc) · 980 Bytes
/
function.js
File metadata and controls
38 lines (30 loc) · 980 Bytes
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
36
37
38
console.log('functions page');
function login(){
console.log('Login function Run!!! \n this is first function Test');
// ** Remove comment sign to try this code **
/*let name = prompt("Write your name!");
alert(`Welcome ${name}`);
console.log(`Tanks ${name} to write your name`)
let qui =confirm(`${name} are you want to continue!!!!!`)
if(qui){
console.log(`Good choice,${name}`);
//alert(`Good choice,${name}`);
}else{
console.log(`Bye,${name}`);
//alert(`Bye,${name}`)
}*/
}
login();
// parameter
function permiter(x,y){
let d = x + y;
console.log(`d=x+y = ${d}`);
let area = d * 2;
console.log(`Permeter for rectangle or Square shape ${area}`);
console.log(`Area for rectangle or Square shape ${x*y}`);
}
let width =Number(prompt('Write width?'));
let heigh = Number(prompt('write Height?'));
permiter(width,heigh);
console.log(`width= ${width}`);
console.log(`heigh= ${heigh}`);