-1
pragma solidity ^0.8.15;
//SPDX-License-Identifier:unlicense

contract arrayupdatedeleteadd{
 string[] myarray3;
 address owner = msg.sender;

 mapping(address => string[]) addressfromarray;

 function setaddmapping(address owner) public{
   owner[msg.sender].push(myarray3(msg.sender,owner));
 }

 function Values(string memory _myarray3) public{
   myarray3.push(_myarray3);
 }

 function update(string memory newValue) public{
   myarray3[1] = newValue;
 }

 function deletearray(uint index) public{
   delete myarray3[index]; 
 }

 function deleteall() public{
   delete myarray3; 
 }

 function getValues() public view returns(string[] memory){
   return myarray3;
 }

 function getaddress() public view returns(address){
   return owner;
 }

}
2
  • 1
    Please can you clarify your issue?
    – Kerry99
    Aug 5 at 10:29
  • I don't understand what you want to do. Besides, the code is weird. I think everything inside setaddmapping is wrong and confusing. This line owner[msg.sender].push(myarray3(msg.sender,owner)); does not make any sense. Anyways, could you please clarify and provide more details of what you need? Aug 5 at 13:40

0

Browse other questions tagged or ask your own question.