-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinheritence.js
More file actions
65 lines (51 loc) · 1.23 KB
/
inheritence.js
File metadata and controls
65 lines (51 loc) · 1.23 KB
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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
// class Human{
// nooflegs;
// noofhands;
// noofeyes;
// constructorck(legs,hands,eyes){
// this.nooflegs=legs;
// this.noofhands=hands;
// this.noofeyes=eyes;
// }
// }
// let human1=new Human("3","4","4");
// console.log(human1);
// class Animal{
// constructor(Name,Color){
// this.Name=Name;
// this.Color=Color;
// }
// run(){
// console.log(this.Name+"Is running")
// }
// shout(){
// console.log(this.Color+"is barking")
// }
// }
// class Dog extends Animal{
// eatbuiskut(){
// console.log(this.Name+"is eating buiskut")
// }
// }
// let ani = new Animal("bruno","white")
// let d=new Dog("chimpu","golden brown")
// ani.bark()
// d.newDog()
// let addition = (a,b) => a+b;
// let num1 =25;
// let num2 =25;
// let sum = addition(num1,num2);
// console.log("Addition of two number will be :",sum);
//PATTERN PRINTIG PRACTICE
// let n = 15;
// for (let i =1; i<=n; i++){
// let str ="*"
// let space = ' ';
// console.log(space.repeat((n-i))+ str.repeat(i));
// }
let n = 5;
for (let i = 0; i<=n; i++){
let str = ' *'
let space = "";
console.log(space.repeat((n-i))+ str.repeat(i));
}