JSFiddle - React, Tailwind, and code Playground
by Zaheer Ahmed
JavaScript
var Student = function () {
var private_property = "It is private property";
var private_function = function () {
console.log("This is private function");
};
};
var student = new Student();
//will print undefine
console.log(student.private_property);
//this will throw an error private_function is not a function
console.log(student.private_function());