string method

Run Settings
LanguageJavaScript
Language Version
Run Command
// let text = "Apple, Banana, Kiwi"; // let slice = text.slice(-9) // let substring = text.substring(-9) // let substr = text.substr(-10,5) // console.log(slice) // console.log(substring) // console.log(substr) // const text1 = " Please visit Microsoft and Microsoft! " // const text2 = "balalalala" // const text3 = "cacacacaca" // const replace = text1.replace(/mi/gi,"GlotIo") // const toUperCase = text1.toUpperCase() // const toLowerCase = text1.toLowerCase() // const concat = text1.concat(text2,text3) // const trim = text1.trim() // const trimEnd = text1.trimEnd() // const trimStart = text1.trimStart() // console.log(replace) // console.log(text1) // console.log(toUpperCase) // console.log(toLowerCase) // console.log(trimStart) let result = "10" let padded = result.padStart(6,"X") console.log(padded)
Editor Settings
Theme
Key bindings
Full width
Lines