I am very new to JavaScript so please bear with me.
So i want to create multiple voucher codes and for each voucher code there is a specific redeemable amount attached to it. And if a user should buy a voucher and after getting the voucher code, inputs it in a textfield, how do i get JavaScript to validate the users voucher code and confirm the amount redeemed and print that out? Just like redeeming Amazon Giftcards!
I want all these done in a simple HTML file i have created.
Since am just starting out JS i can't seem to achieve this yet on my own.
for example i have several voucher codes in strings:
var voucher1 = AC60";
var voucher2= 'DC60';
var voucher3= 'RC60';
var voucher4= 'XC60';
var voucher5= 'YC60';
var voucher6= 'WC60';
var voucher7= 'ZC60';
How do i attach monetary value for each and validate a users input to confirm which has been redeemed and print out the value just like redeeming amazon giftcards?