Skip to content

Instantly share code, notes, and snippets.

View HabibulHH's full-sized avatar
🎯
Focusing

Hira Hasan HabibulHH

🎯
Focusing
View GitHub Profile
let Student= function (name,age){
this.name=name;
this.age=age;
this.showStudentInfo= function (){
console.log(this.name,this.age);
}
}
let std= new Student("labib",23);
let isValid=function(){
return false;
}
function GetStudentList(isValidFuncAsParam){
if(isValidFuncAsParam()===true){
return ["labib","jinnah"];
function GetStudentIdByName(name){
console.log(this);
function getname(){
console.log(this)
console.log(name)
}
getname()
import ReactDOM from 'react-dom';
import React from 'react';
import App from './components/app';
import ReduxPromise from 'redux-promise';
import reducers from './reducers/StoreState';
import {Provider} from 'react-redux'
import {createStore,applyMiddleware} from 'redux';
const createStoreWithMiddleware=applyMiddleware(ReduxPromise)(createStore);
ReactDOM.render(<Provider store={createStoreWithMiddleware(reducers)}>
<App/>
{
"name": "reatwebpacksetup",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"start": "webpack-dev-server --mode development --hot --open",
"build": "webpack --mode production"
},
"author": "hira hasan",
const {mongoose} = require('./mongoconnect');
const User=mongoose.model('Users',{
name:{
type:String,
required:true,
minlength:2
},
age:{
type:String
import ReactDOM from 'react-dom';
import React from 'react';
import App from './components/app';
import ReduxPromise from 'redux-promise';
import reducers from './reducers/StoreState';
import {Provider} from 'react-redux'
import {createStore,applyMiddleware} from 'redux';
const createStoreWithMiddleware=applyMiddleware(ReduxPromise)(createStore);
import React, {Component} from 'react';
import ReactDOM from 'react-dom';
import ReactQuill, {Quill, Mixin, Toolbar} from 'react-quill';
export default class TextEditor extends Component {
constructor(props) {
super(props);
this.state = {
text: '',
const {mongoose,ObjectID} = require('mongoose');
const {User} = require('../DB/MODEL/user');
module.exports=function(app)
{
app.get('/api/getusers',(req,res)=>{
User.find().then((data)=>{
res.send({data});
},(err)=>{
res.status(404).send(err);
{
"name": "reactexpress",
"version": "1.0.0",
"description": "Simple starter package for Redux,React, Babel , Webpack , node js , mongo , mongose , Express js , Bootstrap",
"main": "index.js",
"repository": "",
"scripts": {
"start": "node ./node_modules/webpack-dev-server/bin/webpack-dev-server.js",
"test": "mocha --compilers js:babel-core/register --require ./test/test_helper.js --recursive ./test",
"test:watch": "npm run test -- --watch"