demo1 // Sample program to show how to embed a type into another type and // the relationship between the inner and outer type. package main import ( "fmt" ) // user defines a user in the program. type user struct { name string email string } //…
function type(obj){ return Object.prototype.toString.call(obj).slice(8,-1); } var t=type(new Number(1)); console.log(t); var t=type("abc"); console.log(t); var t=type(new String("abc")); console.log(t); var t=type(true); console.log(t…