JavaScript as a second language let languageWeUse = 'JavaScript' - - PowerPoint PPT Presentation

javascript as a second language let languageweuse
SMART_READER_LITE
LIVE PREVIEW

JavaScript as a second language let languageWeUse = 'JavaScript' - - PowerPoint PPT Presentation

JavaScript as a second language let languageWeUse = 'JavaScript' if (intimidating == true) { dontPanic('about it') } Types of languages natural languages (English, Mandarin) formal languages symbolic (math, logic) computer


slide-1
SLIDE 1

JavaScript as a second language

slide-2
SLIDE 2

let languageWeUse = 'JavaScript' if (intimidating == true) { dontPanic('about it') }

slide-3
SLIDE 3

Types of languages

  • natural languages (English, Mandarin)
  • formal languages
  • symbolic (math, logic)
  • computer languages (JavaScript, Python)
  • constructed languages (Esperanto, Klingon)
slide-4
SLIDE 4

Parts of speech

slide-5
SLIDE 5

Parts of speech

  • noun: a thing
  • proper noun: a specific, named thing
  • verb: an action
  • adjective, adverb: modifies a noun, verb
  • conjunction: used to combine words and phrases
  • preposition: determines how one noun relates to another
  • interjection: a word used to express emotion
slide-6
SLIDE 6

Programming

  • noun ⇨ variable
  • proper noun ⇨ object
  • verb ⇨ function
  • adjective, adverb ⇨ declaration
  • conjunction ⇨ control flow
  • prepositions ⇨ operator
  • interjection ⇨ errors and promises
slide-7
SLIDE 7

Document structure

  • phrase: a group of words forming a unit
  • sentence: one or more phrases to describe an event/concept
  • paragraph: one or more closely related sentences
  • punctuation: used to delineate phrases, sentences, etc.
  • section: a group of related paragraphs, usually under a subhed
  • essay, story: a relatively short document comprised of only paragraphs or sections
  • chapter: a group of related sections within a larger document
  • book: a lengthy document consisting of related chapters
  • library: a collection of books, often for checkout
slide-8
SLIDE 8

Software structure

  • phrase ⇨ expression
  • sentence ⇨ statement
  • paragraph ⇨ block
  • punctuation ⇨ symbols, white space
  • section ⇨ section
  • essay, story ⇨ script
  • chapter ⇨ component
  • book ⇨ application
  • library ⇨ library
slide-9
SLIDE 9

Object-oriented programming

slide-10
SLIDE 10

Classes

  • In natural languages the individuals described by

proper nouns are often called a kind of thing. The members of a kind typically have a common set attributes (e.g. age ) and capabilities (e.g. speak).

  • In object-oriented programming (OOP) objects have
  • classes. The members of those classes have a common set
  • f attributes (variables) and methods (functions).
slide-11
SLIDE 11

Subclasses

  • In natural languages, within one kind of thing can be

multiple more specific kinds of thing. For example, Great White Sharks are a kind of shark. A church is a kind of building. A pomeranian is a kind of dog.

  • In computing we call that a subclass. Subclasses

inherit their parent class's attributes and methods, but can add new ones and remove or modify existing

  • nes.
slide-12
SLIDE 12

Lab #1

slide-13
SLIDE 13

Create a github.com account

slide-14
SLIDE 14

create an

  • bservablehq.com account
slide-15
SLIDE 15

daniel.buzz/data-journalism Click on Lab 1