Skip to content

<html> "strings" lab #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 4 commits into
base: master
Choose a base branch
from
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
24 changes: 13 additions & 11 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,27 +3,29 @@
For the following challenges you are going to use a provided data template.

2. Copy the clone URI from this repo.
3. In your terminal, go into your dev folder and type 'git clone' + paste the link. Make sure you're in `~/dev` first!
4. Open this directory up in your text editor
5. Paste the data object into the JS file.
6. Type your solution into the document.ready method.
8. You should console.log your solutions
7. Run your file by opening your index.html page in Chrome
3. In your terminal, go into your wdi folder and type 'git clone' + paste the link. Make sure you're in `~/wdi` first!
4. Open this directory up in your text editor.
5. Paste the data object from data.js into the `js/app.js` file.
6. Type your solutions into the `document.ready` method.
8. You should `console.log` your solutions for the first set of problems.
7. Run your file by opening your `index.html` page in Chrome.
8. Rejoice!


0. As a warmup, try to output the following values:
0. As a warmup, try to log the following values:
* the name of the course
* the full array of students
* all of the first student's information
* the first student's id and full name
* the number of students in the class
* a list of github usernames
* a list of GitHub usernames

1. Create a function `buildGithubLink` that transforms a single student's info into an html string, with the following format:
1. Create a function `buildGitHubLink` that transforms a single student's info into an html string, with the following format:

```
<a href="https://github.com/torvalds">Linus Torvalds</a>
```

2. Using the function you just built, create a function called `renderGithubLinks` that takes an array of students and adds their github links to the page.
2. Using the function you just built, create a function called `renderGitHubLinks` that takes an array of students and adds their github links to the page.

Extra points if you use built-in Array methods like `forEach`, `map`, and `join` and only insert into the DOM once.
Extra points if you use built-in Array methods like `forEach`, `map` and `join` and only insert into the DOM once.
File renamed without changes.
4 changes: 2 additions & 2 deletions index.html
Original file line number Diff line number Diff line change
Expand Up @@ -8,14 +8,14 @@

<!-- STYLESHEETS -->
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/css/bootstrap.min.css">
<link rel="stylesheet" href="css/styles.css">
<link rel="stylesheet" href="css/style.css">

<!-- VENDOR SCRIPTS -->
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.3/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.5/js/bootstrap.min.js"></script>

<!-- APPLICATION SCRIPTS -->
<script src="base.js"></script>
<script src="js/app.js"></script>
</head>
<body>
<div class="container">
Expand Down
2 changes: 1 addition & 1 deletion base.js → js/app.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
console.log("Sanity Check: JS is working!");
console.log('Sanity Check: JS is working!');

$(document).ready(function(){

Expand Down