Wrote questionNode function in logic.js