Skip to content
Advertisement

Assign value in dictionary to a variable from input [closed]

JavaScript

I tried running this code, but it didn’t work.

The code is meant to check the membership status of some individual after inputting their name. How can I make this work?

Advertisement

Answer

You can use in operator. For example:

JavaScript

Prints:

JavaScript
User contributions licensed under: CC BY-SA
7 People found this is helpful
Advertisement