I have this Python code:
This code randomly prints the first value from Hanzi dictionary and then gets input from user and evaluates.Code:Hanzi ={'我':'wo3','你':'ni3','他':'ta1'}#this is the dictionary randHanzi=random.choice(list(Hanzi)) print(randHanzi) userInput=input() if (userInput,randHanzi) in Hanzi.items(): print('Yes!') elif (userInput,randHanzi) not in Hanzi.items(): print('No!')
How to do this in JavaScript???