This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
<!DOCTYPE html>
|
||||
<!doctype html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
<meta charset="UTF-8" />
|
||||
@@ -27,6 +27,11 @@
|
||||
'use strict';
|
||||
|
||||
const name = ' Ladislaus Coolio Jones '.trim();
|
||||
const firstName = name.substring(0, name.indexOf(' '));
|
||||
const lastName = name.substring(name.lastIndexOf(' ') + 1);
|
||||
|
||||
console.log(firstName); // => 'Ladislaus'
|
||||
console.log(lastName); // => 'Jones'
|
||||
</script>
|
||||
</body>
|
||||
</html>
|
||||
|
||||
Reference in New Issue
Block a user