We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 4985572 commit 619d5ceCopy full SHA for 619d5ce
2 files changed
…ision/19_oops_and_classes/inheritance.js …on/19_oops_and_classes/04_inheritance.js25_Revision/19_oops_and_classes/inheritance.js renamed to 25_Revision/19_oops_and_classes/04_inheritance.js
25_Revision/19_oops_and_classes/05_abstraction.js
@@ -0,0 +1,13 @@
1
+// I want without trim method show i want to trim work for string
2
+let myName = "Sujit "
3
+
4
+// with trim function
5
+console.log(myName.trim().length) // 5
6
7
+// abstract method trim and show another key for trim method
8
+String.prototype.trueLength = function(){
9
+ console.log(`true length is ${this.trim().length}`)
10
+ return(`true length is ${this.trim().length}`)
11
+}
12
13
+myName.trueLength() // true length is 5
0 commit comments