Starting shortly.

  • Coffee is on the house (Tell the barista you're with the meetup)

Announcements

  • Missing a flash drive?

  • Continue the discussion on Slack

  • Next time: Ionic2 Intro

  • New members/Intros

What most languages have

  • Variables

    • Primitives, Objects

  • Control Structures

  • Functions/Methods

  • Operators

Control Structures

  • Conditionals

  • Loops

Conditionals

if and else

Is Logged In?

Yes

No

Show Dashboard

Show Login Page

if (loggedIn) {
    // Show Dashboard
}else if(!loggedIn) {
    // Show login Page
}

Is Logged In?

Yes

otherwise

Show Dashboard

Show Login Page

if (loggedIn) {
    // Show Dashboard
} else {
    // Show login Page
}

Conditionals

if and else

if (condition) {
    block of code to be executed if the condition is true
}
if (condition) {
    block of code to be executed if the condition is true
} else { 
    block of code to be executed if the condition is false
}
if (condition1) {
    block of code to be executed if condition1 is true
} else if (condition2) {
    block of code to be executed if the condition1 is false and condition2 is true
} else {
    block of code to be executed if the condition1 is false and condition2 is false
}

Conditionals

switch

What kind of User is this?

Guest

...

Sales

Admin

CFO

IT

CEO

...

...

...

...

...

Finally

...

Conditionals

switch

switch(expression) {
    case n:
        code block
        break;
    case n:
        code block
        break;
    default:
        default code block
}

EXAMPLES

DOM

<html>
    <head>
        <title>My title</title>
    </head>
    <body>
        <h1>A Heading</h1>
        <a href="#">Link Text</a>
    </body>
</html>

Fundamentals of Web Development Part 2

By genuchelu

Fundamentals of Web Development Part 2

  • 366