I am trying to build a simple application on ethereum where strings can be added/deleted from an array and the contents of this array can be shown in a frontend UI.
The basic structure of the smart contract is:
pragma solidity ^0.4.18;
contract ExampleApp {
<string array over here>
function add(string x) public {
}
function delete(string x) public{
}
}
I have 2 questions: How can I initialise a string array and secondly how to delete a specific item from the string array? Do I have to iterate through the array to find the string or is there some simpler way?