Skip to content

Instantly share code, notes, and snippets.

View PrimeTimeTran's full-sized avatar
🎯
Focusing

Loi Tran PrimeTimeTran

🎯
Focusing
View GitHub Profile
# Arrays Exercise
Here we'll go through some arrays that highlight the various Array Methods in JavaScript.
```
const inventors = [
'Albert Einstein',
'Issac Newton',
'Galileo Galilei',
'Marie Curie',

Build Spotify Landing Page (Desktop/Laptop version)

Overview:

The goal of this lab is to help you understand the materials that we went over yesterday, but for a more complicatd case. After completing the lab, you should be able to create any webpage from scratch quickly without any issue at all. (Okay, some issues are fine.)

dwight

We're going to be cloning a real life landing page - everyone's favorite music streaming service, Spotify! Go check out www.spotify.com for a preview of what you can build.

# Number Guessing Game (Basic)
Congratulations, you're on your way to learning JavaScript. For your final Day 1 assignment, you'll have to build a simple number guessing game.
Doing this assignment will test your ability to use variables, functions, and (optionally, if you're brave!) Arrays. We'll cover Arrays in depth next week, but if you want to try now, go ahead!
## Milestone 0: Draw a Picture
![](https://i.imgur.com/KZVZMOT.png)
{
"candidates": [
{
"id": 69,
"first_name": "Carola",
"last_name": "Linsley",
"email": "[email protected]",
"gender": "Female",
"country": "Brazil",
"job_title": "VP Marketing",
const http = require('http');
const request = require('request');
require('dotenv').config();
const clientId = process.env.REACT_APP_CLIENT_ID;
const secretKey = process.env.REACT_APP_SECRET_KEY;
console.log('started server on port 5000');
http.createServer((req, res) => {
const girlfriends = [
{ isHappy: false, name: 'Binna', likesMovies: false, likesFlowers: true, favoriteFlowerColor: 'red' },
{ isHappy: true, name: 'Vivian', likesMovies: false, likesFlowers: true },
{ isHappy: false, name: 'Tram', likesMovies: true, likesFlowers: false },
{ isHappy: true, name: 'Diep', likesMovies: true, likesFlowers: true },
]
function takeToMovie(girlfriend) {
console.log('Loi is taking ' + girlfriend.name + ' to the movies')
}
function buyFlowers(girlfriend) {
<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Todo List</title>
<meta name="description" content="Todo List">
<meta name="author" content="SitePoint">
document.getElementById("todoInput").focus()
const node = document.getElementById("todoInput");
node.addEventListener("keyup", (e) => {
if (e.key === "Enter") {
addTodo()
}
});
const todos = [
{ done: true, body: 'Go to School'},
{ done: false, body: 'Have some coffee'},
@PrimeTimeTran
PrimeTimeTran / ElCaptain.js
Last active July 29, 2019 06:28
Elcapitan
const people = [
{
id: 1,
firstName: "Loi",
lastName: "Tran",
age: 18,
favoriteColor: "red",
favoriteColors: ["red", "white", "blue"],
favoriteSingers: ["Mariah Carey", "Justin Bieber", "Britney Spears"],
nationality: "U.S.A.",
import React, { useState, useEffect } from 'react';
import './App.css';
function App() {
const [cart, setCartItem] = useState({ items: [] })
const getCart = async() => {
const cart = await localStorage.getItem('cart')
if (cart) {
const cartObject = {