object.constructor

node v14.20.1
version: 0.0.1
endpointsharetweet
const s1 = 's'; log('s1 instanceof String'); log('typeof s1'); log('s1.constructor === String'); const s2 = new String('s'); log('s2 instanceof String'); log('typeof s2'); log('s2.constructor === String'); function log(code) { console.log(`${code}: ${eval(code)}`); }
Loading…

no comments

    sign in to comment