This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let punchline: string = 'Because it was free-range.'; | |
let joke: string = ` | |
Q: Why did the chiken cross the road? | |
A: ${punchline} | |
`; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let name: string = 'Chris'; | |
let breed: string = 'Border Collie'; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let isAwesome: boolean = true; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var greeting = function (person) { | |
console.log('Good day ' + person); | |
}; | |
greeting('Daniel'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const greeting = (person: string) => { | |
console.log('Good day ' + person); | |
}; | |
greeting('Daniel'); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# NPM Installation Method | |
npm install --global typescript # Global installation | |
npm install --save-dev typescript # Local installation | |
# Yarn Installation Method | |
yarn global add typescript # Global installation | |
yarn add --dev typescript # Local installation |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
const AboutPage = ({ data }) => { | |
const { markdownRemark: page, footerData, navbarData } = data; | |
const { | |
frontmatter: { | |
seo: { title: seoTitle, description: seoDescription, browserTitle }, | |
}, | |
} = page; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
export const aboutPageQuery = graphql` | |
query AboutPage($id: String!) { | |
markdownRemark(id: { eq: $id }) { | |
html | |
frontmatter { | |
title | |
mainImage { | |
image |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
... | |
collections: | |
- name: "meetups" | |
label: "Meetups" | |
description: "Meetup dates, location, and presenter information." | |
folder: "src/pages/meetups" | |
create: true | |
fields: | |
- { label: "Template Key", name: "templateKey", widget: "hidden", default: "meetup" } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Constructor function that creates an object with the sentences property | |
function GenerateNewText() { | |
// Add property to the object | |
this.sentences = | |
[ | |
"Awesome quote number 1.", | |
"Second awesome quote.", | |
"Yet another great quote.", | |
"Ok, last quote." | |
]; |