This commit is contained in:
2024-09-20 07:46:16 +02:00
parent 51c4b93077
commit c31f1b9686
2 changed files with 13 additions and 0 deletions

View File

@ -69,11 +69,18 @@ document.addEventListener("DOMContentLoaded", function() {
out.innerHTML += "Replace letter 'a' with 'o': " + text.replaceAll("a", "o") + "<br>";
out.innerHTML += "Fill till 15 with 'o': " + text.padStart(15, "o") + "<br>";
out.innerHTML += "Fill till 15 with 'o': " + text.padEnd(15, "o") + "<br>";
out.innerHTML += "Slice: " + text.slice(0, 3) + "<br>";
}else{
out.innerHTML = "";
}
};
document.getElementById("MethodChaining").onclick = function(){
let name = window.prompt("Please enter your gorgeous name!!");
username = username.strim()
}
});