/Create-a-NFT-Collection

Metacrafters: Javascript Assessment

Primary LanguageJavaScript

Metacrafters: Javascript Assessment

Project: Create a NFT Collection

Assessment Requirments:

  1. Create a variable that can hold a number of NFT's. What type of variable might this be?

  2. Create an object inside your mintNFT function that will hold the metadata for your NFTs. The metadata values will be passed to the function as parameters. When the NFT is ready, you will store it in the variable you created in step 1.

  3. Your listNFTs() function will print all your NFTs metadata to the console (i.e console.log("Name: " + someNFT.name))

  4. For good measure, getTotalSupply() should return the number of NFT's you have created.


Here is a basic JS file to get you started:

Create a variable to hold your NFT's

// Code here

This function will take in some values as parameters, create an NFT object using the parameters passed to it for its metadata, and store it in the variable above.

function mintNFT(){
    // Code here
}

Create a 'loop' that will go through an 'array' of NFT's and print their metadata with console.log()

function listNFTs(){
    // code here
}

Print the total number of NFTs we have minted to the console

function getTotalSupply(){
    // code here
}

Call your functions below

You can find the solution here.
I recommend you to learn the basics of Solidity in MetaCrafters or check out my notes on this repo, before attempting this assessment.


Author: Twitter: @jfmartinz
Github: @jfmartinz
Linkedin: @jfmartinz