You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
This file contains ambiguous Unicode characters that may be confused with others in your current locale. If your use case is intentional and legitimate, you can safely ignore this warning. Use the Escape button to highlight these characters.
const animation = document . getElementById ( "footer" )
const header = document . getElementById ( "header" )
const headerWords = [ "Motivaional Speaker" , "Programmer" , "Educator" , "Content Creator" , "Motivator" , "Instructer" ]
const footerWords = [ "HTML" , "CSS" , "JavaScript" , "React" ] ;
let i = 0 ; // bu değişkeni genel olarak tanı mlamak gerekiyor
function typeWord ( ) {
if ( i < footerWords . length ) {
let currentWord = footerWords [ i ] ;
animation . innerHTML = "The tecnologies I teach " + ` <span> ${ currentWord } </span> `
setTimeout ( typeWord , 2000 )
i ++
} else {
i = 0 ;
typeWord ( ) ;
}
}
typeWord ( ) ;
function headerAnimation ( ) {
if ( i < headerWords . length ) {
let currentWord = headerWords [ i ]
header . innerHTML = currentWord
i ++
setTimeout ( headerAnimation , 2000 )
}
else {
i = 0
headerAnimation ( )
}
}
headerAnimation ( )