Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
52 changes: 52 additions & 0 deletions Introduction-to-JavaScript/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# Introduction To JavaScript

The module is the afternoon assignment or task that students work through independently. This expands on the live lecture completed earlier with the instructor.

## JavaScript Foundations

## Objectives

- use let, const, var and demonstrate their differences.
- understand and be able to use arrays.
- write a basic for loop / while loop.
- write control flow using if/else statements.
- use function declarations, expressions, and arrow
functions and describe their differences

## Introduction

Today you'll worth through 5 JavaScript Tasks to practice today's objectives and get familiar and comfortable with the foundations of JavaScript.

Assignments are outlined in the `index.js` file, please read the instructions carefully for each task and complete it. Note that you may have to use your googling skills to research and look things up if you do not have all the information you need to complete the task.


## Instructions

### Task 1: Set up Project

Using VSCode and Command Line:


1. Fork the repo
2. Add your GL as a collaborator.
3. Clone your forked version of the repo
4. cd into your repo and create a branch with your first and last name
4. Read this "README" file and the `index.js` file carefully to do the assignment
5. Complete your work making regular commits, when you finish the assignment, commit and create a pull request

### Task 2: MVP

Find the `index.js` file and complete the tasks as they're written in there.

As you work on your code you should make use of `console.log` to check your progress and debug.

### Task 3: Stretch Goals

After you have completed the requirements, try any of the following challenges. As always, note that these may require additional research beyond what you learned in this module.

- [ ] See tasks labelled stretch. Please ensure you've completed MVP before you attempt the stretch goals.


## Resources

🧮 [Polya's 4 Step Approach to Problem Solving](http://web.mnstate.edu/peil/M110/Worksheet/PolyaProblemSolve.pdf)
25 changes: 25 additions & 0 deletions Introduction-to-JavaScript/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Javascript</title>
<style>
body{
background-color: bisque;
color: grey;
text-align: center;
font-size: 2.5rem;
}
</style>
</head>
<body>
<h2>Introduction To <br> Javascript</h2>
<h3>look at the console</h3>
<script src="index.js">


</script>

</body>
</html>
96 changes: 91 additions & 5 deletions index.js → Introduction-to-JavaScript/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,19 @@ Do the following:
2. Return true if age is 18 or higher

*/
let votingAge= 13

if (votingAge >=18)
{
console.log("true")
}
else if (votingAge <18)
{
console.log("false")
}
else {
console.log(child)
}



Expand All @@ -21,7 +34,9 @@ Do the following:

*/


let x;
x=10* (25/5) + 50/2
console.log(x)

/*
Task 3 - Convert Strings to Numbers
Expand All @@ -33,6 +48,11 @@ Do the following:

HINT: look up the Number method
*/
const sum="1999"
console.log(typeof(sum));





/*
Expand All @@ -44,6 +64,19 @@ Do the following:
3. Else just print 'So moody!'

*/
//HAPPY TEST
function testmood(a) {
if (a >10 ) {
return 'Yay me too!';
}
else if (a <10 ) {
return 'Aw cheer up'
}
else {
return 'So moody!'
}
}
console.log(testmood(10))


/*
Expand All @@ -54,10 +87,28 @@ Task 5 - Odd or Even
Use conditionals to check if a hardcoded number is odd or even, and then console.log the number is odd or even with the numbers value.

*/
let number= 3

if (number % 2 ==0)
// number is even
{
console.log("Even")
}
else if (number % 2 ==1)
// number is odd
{
console.log("Odd")
}
else {
console.log("prime")
}

var num; // write a number here

// write your conditions here







/*🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀 FIZZBUZZ 🚀🚀🚀🚀🚀🚀🚀🚀🚀🚀*/
Expand Down Expand Up @@ -101,6 +152,21 @@ It's okay for it to be slow.


*/
for ( let i=1; i< 101; i++ )
{
if (i%15 === 0){
console.log('FizzBuzz');
}
else if(i%5 === 0){
console.log('Fizz');
}
else if(i%3 === 0){
console.log('Buzz');
}
else {
console.log(i);
}
}


/*💪💪💪💪💪💪💪💪💪💪 Stretch 💪💪💪💪💪💪💪💪💪💪*/
Expand All @@ -116,6 +182,26 @@ Using the vowelCounter function below do the following:
*/


function vowelCounter(/*add your code here*/) {
//function vowelCounter(str/*add your code here*/)

/*add your code here*/
}
function vowel_count(str1)
{
var vowel_list = 'aeiouAEIOU';
var vcount = 0;

for(var x = 0; x < str1.length ; x++)
{
if (vowel_list.indexOf(str1[x]) !== -1)
{
vcount += 1;
}

}
return vcount;
}
console.log(vowel_count("How many vowels are there?"));




53 changes: 1 addition & 52 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,52 +1 @@
# Introduction To JavaScript

The module is the afternoon assignment or task that students work through independently. This expands on the live lecture completed earlier with the instructor.

## JavaScript Foundations

## Objectives

- use let, const, var and demonstrate their differences.
- understand and be able to use arrays.
- write a basic for loop / while loop.
- write control flow using if/else statements.
- use function declarations, expressions, and arrow
functions and describe their differences

## Introduction

Today you'll worth through 5 JavaScript Tasks to practice today's objectives and get familiar and comfortable with the foundations of JavaScript.

Assignments are outlined in the `index.js` file, please read the instructions carefully for each task and complete it. Note that you may have to use your googling skills to research and look things up if you do not have all the information you need to complete the task.


## Instructions

### Task 1: Set up Project

Using VSCode and Command Line:


1. Fork the repo
2. Add your GL as a collaborator.
3. Clone your forked version of the repo
4. cd into your repo and create a branch with your first and last name
4. Read this "README" file and the `index.js` file carefully to do the assignment
5. Complete your work making regular commits, when you finish the assignment, commit and create a pull request

### Task 2: MVP

Find the `index.js` file and complete the tasks as they're written in there.

As you work on your code you should make use of `console.log` to check your progress and debug.

### Task 3: Stretch Goals

After you have completed the requirements, try any of the following challenges. As always, note that these may require additional research beyond what you learned in this module.

- [ ] See tasks labelled stretch. Please ensure you've completed MVP before you attempt the stretch goals.


## Resources

🧮 [Polya's 4 Step Approach to Problem Solving](http://web.mnstate.edu/peil/M110/Worksheet/PolyaProblemSolve.pdf)
## MY FIRST GITHUB
1 change: 1 addition & 0 deletions Responsive-Design
Submodule Responsive-Design added at 99347f
90 changes: 86 additions & 4 deletions index.html
Original file line number Diff line number Diff line change
@@ -1,11 +1,93 @@
<!-- Markup the content below with tags and attributes such that it can be styled in CSS-->
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<title>Javascript</title>
<!-- Link your CSS stylesheet -->
<link rel="stylesheet" href="index.css">

</head>
<body>
<script src="index.js"></script>

<!-- company name -->
<div class="head">

<div class="head1">
<h1>Fatuma Restaurant</h1>
</div>

<!-- Navigation -->
<nav>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Menu</a></li>
<li><a href="#">Catering</a></li>
<li><a href="#">Contact</a></li>
</ul>
</nav>
</div>
<div class="ahmed">
<h1>TASTE THE DIFFERENCE</h1>
<h2>LOCAL. FRESH & DELICIOUS</h2>
</div>
<!-- header -->
<section class="mah">
<h2>About Fatuma Restaurant</h2>
<p>Lorem Ipsum is simply dummy ext of the printing and typesetting industry. Lorem Ipsum has been the
industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and
scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into
electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of
Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like
Aldus PageMaker including versions of Lorem Ipsum.</p>
</section>
<!-- content -->
<div class="showcase">
<div class=container>
<div class="row">
<div class="hooyo2">
<h2 style="text-align: center;">Pasta with Banana</h2>
<p>scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged. It was popularised in the 1960s with the release of Letraset sheets containing Lorem Ipsum passages, and more recently with desktop publishing software like Aldus PageMaker including versions of Lorem Ipsum.</p>
</div>
<div class="hooyo2">
<h2 style="text-align: center;">Rice with Banana</h2>
<p style="text-align: center;">scrambled it to make a type specimen book. It has survived not only five centuries, but also the leap into electronic typesetting, remaining essentially unchanged.</p>
</div>
</div>
<div class=container2>
<div class="row1">
<div class="hooyo1">
<h2>Catering</h2>
<p>Nullam quis odio sit amet arcu sagittis ullamcorper vel vel ex. <br> Duis consectetur sit amet metus quis congue. Nullam vitae <br> viverra quam, vel volutpat nisi. Phasellus id mi sit amet nibh rutrum luctus.</p>
</div>
<div class="hooyo1">
<h2>contact</h2>
<p style="text-align: center;">info@fatumarestaurant.com <br>
619-555-0144 <br>
4209 Bobcat Drive <br>
San Diego, CA, 48219
</div>
</div>
</div>
</div>
<!-- footer -->
<footer class="footer">

<div class="footer1">
<h1>Fatuma Restaurant</h1>
</div>

<section>
<ul>
<li><a href="#">About</a></li>
<li><a href="#">Menu</a></li>
<li><a href="#">Catering</a></li>
<li><a href="#">Contact</a></li>
</ul>
</section>
</div>
</footer>
<div class="one">
<h3>Copyright Fatuma Restaurant 2020
</h3>
</div>
</body>
</html>