Posts

Showing posts from July, 2025

Mern.

batman.js class Batman { #realname = "Bruce Wayne"; getsuperheroname() { return "This is batman"; } getidentity() { } return "My secret identity is " + this.#realname; } module.exports = Batman; super.js class Superman { #realname = "Clark Kent"; getsuperheroname() { return "This is superman"; } getidentity() { return "My secret identity is " + this.#realname; } } module.exports = Superman; main.js const BatmanClass = require("./batman.js"); const SupermanClass = require("./super.js"); const Batman = new BatmanClass(); const Superman = new SupermanClass(); console.log(Batman.getsuperheroname()); console.log(Batman.getidentity()); console.log(Superman.getsuperheroname()); console.log(Superman.getidentity()); pass.js function CR(Marks, callback) { console.log("checking result"); if (Marks >= 35) { callback("passed"); } else { callback("failed"); } } function DR(result) { conso...