Coding task · Blockchain and Web3 course · Module 6: Solidity Basics
Implementing a Modifier
Simulate a modifier in JavaScript as a function that checks a condition.
Task
Write an onlyOwner function that checks whether caller === owner and throws an error if not