Skip to content

Instantly share code, notes, and snippets.

Starting on git hub

Nelson edoves

Starting on git hub
View GitHub Profile
View divisibleby3.js
Hello; Hello World; World
Write a function that takes an integer and:
If the number is a multiple of 3, return "Hello".
If the number is a multiple of 5, return "World".
If the number is a multiple of both 3 and 5, return "Hello World".
helloWorld(3) "Hello"
helloWorld(5) "World"
View index.html
<!DOCTYPE html>
<html lang="en">
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<meta http-equiv="X-UA-Compatible" content="ie=edge" />
<link rel="stylesheet" href="css/style.css" />
View todolist-and-function-jquery.js
"todoitem": [
"id": 1,
"item": "first todo",
"complete": true
"id": 2,
"item": "second todo",
View todolist-sample.json
"todolist": [
"id": 1,
"title": "first todo",
"description": "pick up milk",
"complete": true,
"canceled": true,
"date": 1389878466730
View express-vanillajs-ajax.js
* ! ####### fetch data from http://localhost:3000/api #######
* ?
* @param
async function updateFeedbackdata() {
const apiResponse = await fetch('api');
const data = await apiResponse.json();
return { data }
View express-jquery-ajax.js
// Jquery Version
$(function () {
$.getJSON('api', updateFeedback);
$('.feedback-form').submit(function (e) {
$.post('api', {
name: $('#feedback-form-name').val(),
title: $('#feedback-form-title').val(),
message: $('#feedback-form-message').val()
View git.bash
# From Kal Skills Teaching procces on cloning a existing repository or want to colaborate with it
git clone - clone a repository
cd - change directory
ls - list directory
git status - mostly for verification
git add filename
git commit -m "waht ever message here"
git push
edoves / reactaxiosadependecy.js
Last active Nov 12, 2019
Calling FetchAPI and Axios
View reactaxiosadependecy.js
import React, { Component } from "react";
import axios from "axios";
import "./App.css";
import { recipes } from "./tempList";
import { AUTH_KEY } from "./config";
import RecipeList from "./components/RecipeList";
import RecipeDetails from "./components/RecipeDetails";
class App extends Component {
state = {
edoves / app.js
Last active Sep 15, 2019
Sample server Express
View app.js
const express = require("express");
const app = express();
// logger
const morgan = require("morgan");
const productRoutes = require("./api/routes/products");
const orderRoutes = require("./api/routes/orders");
// using the morgan the resul will beo nthe terminal
View installation code for react
npm i react react-dom
npm i -D @babel/core @babel/preset-env @babel/preset-react webpack webpac-cli webpack-dev-server babel-loader css-loader style-loader html-webpack-plugin
You can’t perform that action at this time.