Lekcja 2
This commit is contained in:
1 parent
ec2fc8b146
commit
6cc32f5146
6 files changed
+166
No files matched your search
@@ -0,0 +1,25 @@
|
||||
<!DOCTYPE html>
|
||||
<html lang="pl">
|
||||
|
||||
<head>
|
||||
<meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
||||
<title>Lekcja 2</title>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
<script>
|
||||
let text = prompt("Wpisz tekst")
|
||||
|
||||
let samogloski = ['a', 'ą', 'e', 'ę', 'i', 'o', 'u', 'y', 'ó']
|
||||
for (let i = 0; i < text.length; i++) {
|
||||
if (samogloski.includes(text[i].toLowerCase())) {
|
||||
document.write(`<b style="color: red;">${text[i]}</b>`)
|
||||
} else {
|
||||
document.write(text[i])
|
||||
}
|
||||
}
|
||||
</script>
|
||||
</body>
|
||||
|
||||
</html>
|
||||
Reference in new issue
Block a user