Create logic.js

Initial commit