panaverse / learn-typescript Goto Github PK
View Code? Open in Web Editor NEWLearning TypeScript in Baby Steps
License: MIT License
Learning TypeScript in Baby Steps
License: MIT License
i make calculator but i dont understand how to upload on github and how to submit projects to governor house teachers
Please support me ββ π everyone who's started this Creat files / program
I have two files, index.ts
and app.ts
. The index.ts
file defines two objects, profile and person
. profile is not exported, but it is logged to the console using console.log(profile["age"])
and console.log(profile["education@"])
. person is exported as the default export.
In app.ts, I import person using import person from "./index.js";
and log person.name
to the console using console.log(person.name);
. I compile the TypeScript code using tsc and then run the resulting JavaScript code using node app.js.
index.ts
const profile = {
name : "Noman..",
age : 25,
"education@": "BSSEs",
}
const person = {
name : "Noman",
age : 24,
"education@": "BSSE",
}
console.log(profile["age"]);
console.log(profile["education@"]);
export default person;
app.ts
import person from "./index.js";
console.log(person.name);
The output is
25
BSSEs
Noman
My question is, why am I seeing console.log
output for profile properties in my app.js
output even though I have not exported the profile object from index.ts
? Also, how can I prevent this console output from appearing in my app.js
output?
Please update the readme
Javascript Object
const detail = { "name": "Vipin", "age": 21 };
JSON Object
const detail = '{ "name": "Vipin", "age": 21 }';
JSON object is string. After parse they are separated into key/value.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. πππ
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google β€οΈ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.