Skip to content

Instantly share code, notes, and snippets.

View prof3ssorSt3v3's full-sized avatar
🎯
Focusing

Steve Griffith prof3ssorSt3v3

🎯
Focusing
View GitHub Profile
@prof3ssorSt3v3
prof3ssorSt3v3 / gist:572d87b609c01fe960902cd48e7db39e
Created September 17, 2023 17:06
A possible sequence for learning JavaScript Topics
# JavaScript Development Topics
This is a sequence for learning JS topics. It is not an absolute list of all topics, nor is it a mandatory order that you must use to learn JS. It is just a logical sequencing of some of the more
important topics and features of the language.
1. Variables
- using `let` and `const`
- declaring variables
- assigning values to variables
@prof3ssorSt3v3
prof3ssorSt3v3 / App.js
Last active September 18, 2023 18:14
Simple Layout Practice Exercise
import { NavigationContainer } from '@react-navigation/native';
import { createNativeStackNavigator } from '@react-navigation/native-stack';
import { SafeAreaProvider } from 'react-native-safe-area-context';
import { Button } from 'react-native';
import HomeScreen from './screens/HomeScreen';
import ListScreen from './screens/ListScreen';
import DetailScreen from './screens/DetailScreen';
const Stack = createNativeStackNavigator();
@prof3ssorSt3v3
prof3ssorSt3v3 / App-1.js
Created September 14, 2023 01:39
React Native Layout Samples
import { SafeAreaView, SafeAreaProvider } from 'react-native-safe-area-context';
import { StyleSheet, Text, View } from 'react-native';
export default function App() {
return (
<SafeAreaProvider>
<SafeAreaView style={styles.container}>
<View style={[styles.box, styles.red]}>
<Text style={styles.txt}>1</Text>
</View>
@prof3ssorSt3v3
prof3ssorSt3v3 / main.dart
Created August 30, 2023 18:15
resonating-aqueduct-1695
void main() {
Dolphin flipper = Dolphin('bottlenose');
print('Flipper is a ${flipper.type} dolphin.');
flipper.eat('crab');
flipper.eat('shark');
flipper.swim();
Kangaroo skippy = Kangaroo('Western Grey');
print('Skippy is a ${skippy.breed} kangaroo.');
@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Created July 13, 2023 17:36
code from video about checking for variable existence
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Variable Existence</title>
<script src="index.js" type="module"></script>
</head>
<body>
<header>
@prof3ssorSt3v3
prof3ssorSt3v3 / main.js
Created July 12, 2023 16:17
The difference between expressions and statements
/*
JS Expressions vs Statements
Expressions => returns a value
Statements => complete task instruction.
*/
123 //expression
1+ 1 //expression
"hello" //expression
true //expression
@prof3ssorSt3v3
prof3ssorSt3v3 / practice.md
Last active October 31, 2023 23:37
JavaScript Practice Exercises

JavaScript Practice Exercises

1. Count Occurrences

Start with an array of integers. Eg: const arr = [1, 2, 3, 2]

Write a function that will loop through the array counting the number of occurences of each value. The return value of the function will be an Object whose keys will be the numbers from the array and whose values will be the occurrence count for each value. Eg: { 1:1, 2:2, 3:1 }

@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Last active June 8, 2023 13:41
code from video about popover and dialogs
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>popover vs dialog</title>
<link rel="stylesheet" href="main.css" />
<script src="main.js" type="module"></script>
</head>
@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Created June 1, 2023 22:27
starter code for exercise
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>Data Management</title>
<link rel="stylesheet" href="main.css" />
<script src="main.js" type="module"></script>
</head>
@prof3ssorSt3v3
prof3ssorSt3v3 / index.html
Created June 1, 2023 22:01
Starter code for exercise
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8" />
<meta http-equiv="X-UA-Compatible" content="IE=edge" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>DOM Events</title>
<link rel="stylesheet" href="main.css" />
<script src="main.js" type="module"></script>
</head>