Skip to content

Instantly share code, notes, and snippets.

View divo662's full-sized avatar
🎯
Focusing

Nzeh Divine divo662

🎯
Focusing
View GitHub Profile
@divo662
divo662 / chapter-project.js
Created January 10, 2026 13:02
Today, I learnt about logical statement in JS, use of If, else and else if for conditional statement, learnt Ternary Operation as well.
const readline = require("readline");
const rl = readline.createInterface({
input: process.stdin,
output: process.stdout
});
let questionBank = ["1 + 1", "1 + 2", "2 + 3", "2 + 2", "3 + 3"];
let answerBank = ["2","3","5","4","6"];
let questionIndex = Math.floor(Math.random() * 5);
let answerIndex = Math.floor(Math.random() * 5);
@divo662
divo662 / chapter-3-arrays-objects-and-array-methods.js
Created January 9, 2026 18:44
Hands-on practice with JavaScript arrays including creation, indexing, length, push, pop, shift, splice, concat, sort, reverse, find, and indexOf as part of my JavaScript fundamentals.
//CHAPTER 3 Array and Objects
arr1= new Array("purple", "orange", "red");
arr2 = ['red', 'pink', 'blue'];
arr3 = new Array(10);
arr4 = [10];
arr5 = ["Dog", 46, true, 45.455];
const arr6 = ["I am Divine", "I am Esther"];
shopList = ["Milk", "Bread", "Apples"];
names = ["dan","ben","john","esther","el","ese", "dee", "lola"]
console.log(arr3);
@divo662
divo662 / chapter-2-variables-datatypes-operators.js
Created January 9, 2026 18:39
Practice notes and examples from Chapter 1 covering what JavaScript is, where it is used, and basic syntax awareness as part of my full-stack web development learning journey.tice code from Chapter 2 focusing on JavaScript variables (var, let, const), data types, type conversion, and basic operators. Written during live learning and experimentat…
//CHAPTER ONE AND CHAPTER TWO
console.log(Math.floor(Math.random() * 100));
// comments
/* comment */
let firstWord = "Hi World";
let printWord = 'Javascript learn ${firstword}';
console.log(printWord);
let language = "JavaScript";