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
11 changes: 11 additions & 0 deletions MaxM.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
// morning coding chalenge
// this is also my first attempt at coe in Js in the command line editer. if only vi had spell check.lol


function reverseNumber(num) {
let result = num.toString();
let result1 = result.split("").reverse().join("");
let result2 = Number(result1)
return result2;
}
console.log(reverseNumber(12345));
3 changes: 3 additions & 0 deletions MaxM.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@

New file
no info of importance.
65 changes: 65 additions & 0 deletions VariablesChalenge.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@

[200~/* ==== Challenge 1: ====
- Create a variable named `name`
- Assign it's value to your first and last name
- Does this variable need to be a constant? It depends completely on you! It should be a const variable IF you intend to never change your name.
*/

code for `name` goes here
const name = 'Max David Metelus';

/* ==== Challenge 2: ====
- Create a variable called `age`
- UNLESS you've descovered a very important secret in life, you should probably allow for `mutability` here.
*/

// code for `age` goes here
let age = '34';

/* ==== Challenge 3: ====
- Create a variable called `myLocation`
- Base the value on where you're currently sitting. Consider if this is something that could change eventually.
*/

// code for `myLocation` goes here
let myLocation = 'in a chair';

/* ==== Challenge 4: ====
- Create a variable called `faveBook`
- Consider if this is some data about yourself that could change.
*/

// code for `faveBook` goes here
const faveBook = 'The Bible';

/* ==== Challenge 5: ====
- Create a variable called `faveBand`
- Consider if this is some data about yourself that could change.
*/

// code for `faveBand` goes here
let faveBand = null;

/* ==== Challenge 6: ====
- Problem create a variable called `faveFood`
- Consider if this is some data about yourself that could change.
*/

// code for `faveFood` goes here
const faveFood = 'My Cooking';

/* ==== Challenge 7: ====
- Look at the function declaration named `example` below
- Comment `block scope` where you see block scope
- Comment `function scope` where you see function scope
*/

function example() {
//function scope( block scope too!)
if(true){
//block scope
}
}


// Check your work against some potential solutions when you're finished: https://codepen.io/lambdaschool/pen/ejbEGN?editors=0012
45 changes: 45 additions & 0 deletions jsBinObjectsExersize.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Objects are used all over in JavaScript.
These following problems will help you get a better feel for object literals
We want you familiar with the following Object methods:
.keys(), .values(), .entries(), .
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype
*/

/*
Problem 1: Giver Info
return an array of an Objects properties/keys
*/

const student = { name: 'Jonas', age: '12', gender: 'M', role: 'Receiver' };
const studentKeys = Object.keys(student);// finish this.

/*
Problem 2: Giver Info
using the same object as above.
return an array of an Objects values
*/

const studentValues = Object.values(student); // finish this.

/*
Problem 3: Giver Info
Add a list of charecters to Jonas' object
The list should be called 'characters' and it should be an array.
example:
{ name: 'Jonas', age: '12', gender: 'M', role: 'Receiver', characters: ['Lily', 'Mother', 'Father', 'Caleb', 'Asher']}
next: select that list and iterate over it using `.forEach` simply log the name of each char in the list;
*/

//const listOfChars = student.characters; // finish this.

student.characters = [];
student.characters.push['Lily'];
student.characters.push['Mother'];
student.characters.push['Father'];
student.characters.push['Caleb'];
student.characters.push['Asher'];

character.forEach(list(){
console.log(list)
})
45 changes: 45 additions & 0 deletions jsBinObjectsExersizeA.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,45 @@
/*
Objects are used all over in JavaScript.
These following problems will help you get a better feel for object literals
We want you familiar with the following Object methods:
.keys(), .values(), .entries(), .
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/prototype
*/

/*
Problem 1: Giver Info
return an array of an Objects properties/keys
*/

const student = { name: 'Jonas', age: '12', gender: 'M', role: 'Receiver' };
const studentKeys = Object.keys(student);// finish this.

/*
Problem 2: Giver Info
using the same object as above.
return an array of an Objects values
*/

const studentValues = Object.values(student); // finish this.

/*
Problem 3: Giver Info
Add a list of charecters to Jonas' object
The list should be called 'characters' and it should be an array.
example:
{ name: 'Jonas', age: '12', gender: 'M', role: 'Receiver', characters: ['Lily', 'Mother', 'Father', 'Caleb', 'Asher']}
next: select that list and iterate over it using `.forEach` simply log the name of each char in the list;
*/

//const listOfChars = student.characters; // finish this.

student.characters = [];
student.characters.push['Lily'];
student.characters.push['Mother'];
student.characters.push['Father'];
student.characters.push['Caleb'];
student.characters.push['Asher'];

character.forEach(list(){
console.log(list);
});
1 change: 1 addition & 0 deletions mMetelus.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
New file for the demo
75 changes: 75 additions & 0 deletions testOut/index.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,75 @@
<!DOCTYPE html>
<html lang="en">

<head>
<meta charset="UTF-8">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<meta http-equiv="X-UA-Compatible" content="ie=edge">
<title>Learnnig Javascript</title>
<link rel="stylesheet" href="">

<style></style>
</head>

<body onload="showDate">
<div id="header">
<h1 id="heading">Learnnig Javascript</h1>
<p></p>
</div>
<div class="container">
<h1 id="time">
</h1>
<button onclick="showDate()">Show Date</button>
<h1 id="time">
</h1>
<button onmouseout="clearDate()" onmouseover="showDate()">Show Date</button>
<p></p>
</div>

<div>
<h1 id="time1"></h1>
<h1>
<p></p>
</h1>
<p></p>
</div>
<div>
<h1></h1>
<label for="">Background</label>
<select name="background" id="background" onchange="changeBackground(this)">
<option value="red">red</option>
<option value="green">green</option>
<option value="blue">blue</option>
<option value="coral">coral</option>

</select>

</div><br>
<script>
function showDate() {
var time = document.getElementById('time');
time.innerHTML = time Date();
}

function clearDate() {
var time = document.getElementById('time1');
time.innerHTML = innerHTML '';
}

function changeBackground(x) {
console.log(x.value);
var body = document.getElementById('body');
body.style.backgroundColor = x.value;
}

function changeBackground(x) {
console.log(x.value);
var heading = document.getElementById('heading');
heading.style.color = x.value;
}
</script>


</body>

</html>