Hi. Creating Hangman game with Jquery, need help
Hallo gaiz. I will not paste all of code that I have used, I will show where I am stacking :
********** this.wrd = this.randomWord(), *****
randomWord: function(){
return this._wordData(this.words[ Math.floor(Math.random() * this.words.length)].word );
},
^^^ this is a random word generator. ^^^^
then i am creating 2 object :
var wordList = [
{ word: "book", hint: "this is my book hint" },
{ word: "room", hint: "this is my room hint" }
]; s
and now when I am using for example : var word = this.wrd.word alert(word) its working and showing a word. but when i am trying to use hint for catch a word. so var hint = this.wrd.hint wont work. Please help me I beg you