Skip to content

Instantly share code, notes, and snippets.

@jack-guy
Created March 10, 2019 02:42
Show Gist options
  • Save jack-guy/9fc379c3a8e4967614c0e4d5c390e059 to your computer and use it in GitHub Desktop.
Save jack-guy/9fc379c3a8e4967614c0e4d5c390e059 to your computer and use it in GitHub Desktop.
const iceCreamFlavors = ['vanilla', 'chocolate', 'strawberry'];
const iceCreamPrices = ['$5.50', '$5.75', '$6.00'];
let iceCreamFlavorToPrice;
for (let i = 0; i < iceCreamFlavors.length; i++) {
iceCreamFlavorToPrice[iceCreamFlavors[i]] = iceCreamPrices[i];
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment