conditionals

This commit is contained in:
Geir Okkenhaug Jerstad 2024-08-22 12:21:23 +02:00
parent bd86d3a373
commit fc7f07ef47
13 changed files with 516 additions and 2 deletions

View file

@ -4,6 +4,7 @@
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Document</title>
<style>
.box{
height: 100px;
@ -42,8 +43,8 @@
element.innerHTML = "hei";
};
function letterPressed(letter){
let letterPress = letter;
console.log('${letterPress}');
let letterPress = letter.innerHTML;
console.log(letterPress);
document.getElementById('letter').innerHTML = `${letterPress}`;
}
</script>