Skip to content

Instantly share code, notes, and snippets.

View Mrshinezee's full-sized avatar

Ijeomah Arinze Collins Mrshinezee

View GitHub Profile
@Mrshinezee
Mrshinezee / Backticks.js
Created March 14, 2018 17:28
Backticks created by Mrshinezee - https://repl.it/@Mrshinezee/Backticks
let call_name = 'shine';
let mention = `Una go hala my name one day ${call_name}`;
alert( mention);
let name = "John";
// embed a variable
alert( `Hello, ${name}!` ); // Hello, John!
@Mrshinezee
Mrshinezee / pow.js
Created March 14, 2018 05:39
pow created by Mrshinezee - https://repl.it/@Mrshinezee/pow
function pow(x,n){
let ans = 1;
for(let i = 0; n > i; i++){
ans = ans*x;
}
return ans;
}
pow(5,2);
let n = 20;
function isPrime(n) {
for (let i = 2; i < n; i++) {
if ( n % i == 0) return false;
}
return true;
}
isPrime(n);
function showPrimes(n) {