Skip to content

Instantly share code, notes, and snippets.

View diasraphael's full-sized avatar
🎯
Focusing

Raphael diasraphael

🎯
Focusing
  • Consigli As
  • Norway,Oslo
View GitHub Profile
function rowSumOddNumbers(n) {
let startValue = n * (n - 1) + 1;
let sum = 0;
for (let i = 1; i <= n; i++) {
if (i == 1) {
sum = startValue
} else {
startValue = startValue + 2;
sum = sum + startValue;
}
function openOrSenior(data) {
const newData = data.map((item) => {
if (item[0] >= 55 && item[1] > 7) {
return 'Senior'
} else {
return 'Open'
}
});
return newData;
}
function reverseString(str){
let reverse = "";
for (let a = str.length - 1; a >= 0; a--){
reverse = reverse + str[a];
}
return reverse;
}
console.log(reverseString("World"));
@diasraphael
diasraphael / cloudSettings
Last active March 12, 2021 13:46
Visual Studio Code Settings Sync Gist
{"lastUpload":"2021-03-12T12:36:27.295Z","extensionVersion":"v3.4.3"}