What do you want to save?
Add Code snippet
New code examples
-
Javascript 2022-01-31 21:15:39
slice method in js
//The slice() method extracts a section of a string and returns //it as a new string, without modifying the original string. // same in array but you select elements not characters const str = 'The quick brown fox jumps over the lazy dog.'; console... Add solution -
Javascript 2021-09-15 15:38:02
how to pad string js
const str1 = '5'; console.log(str1.padStart(2, '0')); // expected output: "05" const fullNumber = '2034399002125581'; const last4Digits = fullNumber.slice(-4); const maskedNumber = last4Digits.padStart(fullNumber.length, '*'); console.log(mas... Add solution -
Javascript 2021-09-09 03:45:04
javascript padstart
const str1 = '5'; console.log(str1.padStart(2, '0')); // expected output: "05" const fullNumber = '2034399002125581'; const last4Digits = fullNumber.slice(-4); const maskedNumber = last4Digits.padStart(fullNumber.length, '*'); console.log(mas... Add solution -
Javascript 2021-08-31 15:21:03
slice()
//The slice() method extracts a section of a string and returns //it as a new string, without modifying the original string. // same in array but you select elements not characters const str = 'The quick brown fox jumps over the lazy dog.'; console... Add solution
Best helpers
Dani Pop
+5
Iammrigank
+5
Brilliand
+5
Alan Huang
+5
ElHaix
+5
Mcwumbly
+5
Rgb66rgb
+5
Saphryn
+5
Brett
+5
Brauner
+5
JAPPAN KAUR
+5
Jjr
+5
Armstrongest
+5
Mae
+5
Elarrow
+5
Ryan Zell17
+5
Lim Kean An
+5