why is this not working
? why MMM function rpsFE(youImgCoice , botImgCoice, FM) { var imgData = { 'rock': document.getElementById('rock').src, 'paper': document.getElementById('paper').src, 'scissors': document.getElementById('scissors').src } } //romve img document.getElementById('rock').remove(); document.getElementById('paper').remove(); document.getElementById('scissors').remove(); var youDiv = document.createElement('div'); var botDiv = document.createElement('div'); var messageDiv = document.createElement('div'); messageDiv.innerHTML = " <h1 style = 'color: " + FM['color'] + "; font-size: 60px; padding: 30px; '>" + FM[' message'] + "</h1>" youDiv.innerHTML = "<img src='" + imgData[youImgCoice] + "' height=150 widhth=150 > <h2>YOU </h2> <style = 'box-shodow' : 0px 10px 50px rgb(53, 7, 139);'>" botDiv.innerHTML = "<img src='" + imgData[botImgCoice] + "' height=150 widhth=150 > <h2>ROBOT </h2> <style = 'box-shodow': 0px 10px 50px rgba(243, 24, 1);'>" document.getElementById('flex-box-rps-div'). appendChild(messageDiv); document.getElementById('flex-box-rps-div'). appendChild(youDiv); document.getElementById('flex-box-rps-div'). appendChild(botDiv); this is not working this is my Error : Uncaught ReferenceError: imgData is not defined function rpsFE(youImgCoice , botImgCoice, FM) { var imgData = { 'rock': document.getElementById('rock').src, 'paper': document.getElementById('paper').src, 'scissors': document.getElementById('scissors').src } }