My unique code is shown below:
function ComputerGuess(){
let Guess = Math.floor(Math.random() * 10) + 1
UserPick()
}
function UserPick(){
let Number = prompt('Select a number between 1 - 100')
if (Number > Guess){
alert('Try choosing a lower number than ' + this.Number)
UserPick()
}
if (Number < Guess){
alert('Try selecting a higher number than ' + this.Number)
UserPick()
}
if (Number == Guess){
let playagain = prompt('Congratulations! Do you want to play again? Y/N')
if (playagain == 'Y' or playagain == 'y'){
ComputerGuess()
}
}
else{
alert('Thanks for playing!')
}
}
ComputerGuess()
SyntaxError: Unexpected identifier at /script.js:19:26
I am a beginner in JavaScript so please excuse any mistakes. Any assistance would be highly appreciated.