
Networks
bấm next qua 2 cái trên ảnh1. đáp án CALLBACK FUNCTIONS/** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { callbackFunction(); } module.exports = runCallback; /** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { setTimeout(callbackFunction, 1000); } module.exports = runCallback; class Dialog { onClose(callbackFunction) { this.carr = this.carr || []; th...

Sui Name Service ($SNS)
twitter :discord :Discord - Group Chat That's All Fun & GamesDiscord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.https://discord.comIt's finally here! Join our Crew3 and earn your spot in the $SNS DAO ➤ http://snsdomains.crew3.xyz ➤ New Quests added Daily! 10 people to Like/RT this tweet will also be selected for the Stork role - Winners selected below. #Sui isn't ready. Let&a...

tương tác Harpie
liên kết víxem ví mình dùng cái nào thì chọn - ví hold token thì chọn cái trên , ví chơi nft thì chọn cái dưới hoặc chọn cả 2 cũng đcchọn cái nào muốn bảo vệđợi cho nó load xong và import token mạng eth hoặc nft nào mà mình muốn bảo vệadd bn token hay nft tùy thích - sau đó chọn protecttốn chút fee ethnhư vậy là xong bước 1tiếp theo chọn setupnhập địa chỉ ví - tốn fee eth - nhập 1 địa chỉ ví khác ví đang dùngtiếp theo đến bước 3chọn mint FAU - tốn fee ethBẤM protect faucet token - tốn fee eth...
vui vẻ

Networks
bấm next qua 2 cái trên ảnh1. đáp án CALLBACK FUNCTIONS/** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { callbackFunction(); } module.exports = runCallback; /** * Runs a callback function immediately * @param {function} callbackFunction */ function runCallback(callbackFunction) { setTimeout(callbackFunction, 1000); } module.exports = runCallback; class Dialog { onClose(callbackFunction) { this.carr = this.carr || []; th...

Sui Name Service ($SNS)
twitter :discord :Discord - Group Chat That's All Fun & GamesDiscord is great for playing games and chilling with friends, or even building a worldwide community. Customize your own space to talk, play, and hang out.https://discord.comIt's finally here! Join our Crew3 and earn your spot in the $SNS DAO ➤ http://snsdomains.crew3.xyz ➤ New Quests added Daily! 10 people to Like/RT this tweet will also be selected for the Stork role - Winners selected below. #Sui isn't ready. Let&a...

tương tác Harpie
liên kết víxem ví mình dùng cái nào thì chọn - ví hold token thì chọn cái trên , ví chơi nft thì chọn cái dưới hoặc chọn cả 2 cũng đcchọn cái nào muốn bảo vệđợi cho nó load xong và import token mạng eth hoặc nft nào mà mình muốn bảo vệadd bn token hay nft tùy thích - sau đó chọn protecttốn chút fee ethnhư vậy là xong bước 1tiếp theo chọn setupnhập địa chỉ ví - tốn fee eth - nhập 1 địa chỉ ví khác ví đang dùngtiếp theo đến bước 3chọn mint FAU - tốn fee ethBẤM protect faucet token - tốn fee eth...
vui vẻ
Share Dialog
Share Dialog



Subscribe to meteosrds

Subscribe to meteosrds
<100 subscribers
<100 subscribers
đáp án STRING MANIPULATION


function startsWithX(string) {
let xstring = string.slice(0, 1);
xstring = xstring.toLowerCase();
if (xstring === "x") {
return true;
}
else {
return false;
}
}
module.exports = startsWithX;

function startsWithX(string) {
let xstring = string.slice(0, 1);
xstring = xstring.toLowerCase();
if (xstring === "x") {
return true;
}
else {
return false;
}
}
module.exports = startsWithX;

function endsWithX(string) {
let xstring = string.slice(-1);
xstring = xstring.toLowerCase();
if (xstring !== "x") {
return false;
}
else {
return true;
}
}
module.exports = endsWithX;

function isAllX(string) {
for (let i = 0; i < string.length; i++) {
let xstring = string[i];
xstring = xstring.toUpperCase();
if (xstring !== "X") {
return false;
}
}
return true;
}
module.exports = isAllX;

function findFirstX(string) {
for (let i = 0; i < string.length; i++) {
let xstring = string[i];
if (xstring === "x") {
return i;
}
}
}
module.exports = findFirstX;

function splitAtX(string) {
for (let i = 0; i < string.length; i++) {
let xstring = string[i];
if (xstring === "x") {
xstring1 = string.slice(i + 1, string.length);
xstring2 = string.slice(0, i);
if (xstring1.length < xstring2.length) {
return xstring2;
}
else {
return xstring1;
}
}
}
}
module.exports = splitAtX;


const array = [1, 2, 3];// <-- create an array here!
module.exports = array;

function hasOne(array) {
if (array.indexOf(1) === -1) {
return false;
}
return true;
}
module.exports = hasOne;

function sumEven(array) {
let s = 0;
for (let i = 0; i < array.length; i++) {
if (array[i] % 2 === 0) {
s = s + array[i];
}
}
return s;
}
module.exports = sumEven;

function unique(array) {
let r = [];
for (let i = 0; i < array.length; i++) {
if (r.indexOf(array[i]) === -1) {
r.push(array[i]);
}
}
return r;
}
module.exports = unique;

function addOne(array) {
for (let i = 0; i < array.length; i++) {
array[i] = array[i] + 1;
}
}
module.exports = addOne;

function removeOccurrences(array, num) {
for (let i = array.indexOf(num); i !== -1; i = array.indexOf(num)) {
array.splice(i, 1);
}
}
module.exports = removeOccurrences;


const order = {
pizzas: 2,
extraCheese: true,
deliveryInstructions: "go to build"
};
module.exports = order;

function numberOfPizzas(order) {
return order.pizzas;
}
module.exports = numberOfPizzas;

function numberOfPizzas(orders) {
let s = 0;
for (let i = 0; i < orders.length; i++) {
s = s + orders[i].pizzas;
}
return s;
}
module.exports = numberOfPizzas;

const ORDER_TYPES = {
PIZZA: 0,
SALAD: 1,
FRIES: 2
}
module.exports = ORDER_TYPES;

const ORDER_TYPES = require('./orderTypes');
function numberOfPizzas(orders) {
let s = 0;
for (let i = 0; i < orders.length; i++) {
if (orders[i].type === ORDER_TYPES.PIZZA) {
s = s + orders[i].pizzas;
}
}
return s;
}
module.exports = numberOfPizzas;

function numberOfKeys(object) {
let n = 0;
for (let key in object) {
n = n + 1;
}
return n;
}
module.exports = numberOfKeys;

function removeSecret(object) {
delete object.secret
}
module.exports = removeSecret;


function shortestString(str1, str2) {
if (str1.length < str2.length) {
return str1;
} else {
return str2;
}
}
module.exports = shortestString;

function halfValue(numbers) {
let retarr = [];
for (let i = 0; i < numbers.length; i++) {
if (0 === numbers[i] % 2) {
retarr.push(numbers[i] / 2);
} else {
let tmp = Math.floor(numbers[i] / 2) + 1;
retarr.push(tmp);
}
}
return retarr;
}
module.exports = halfValue;

function countC(str) {
let c = 0;
let cstr = str.toLowerCase();
let i = cstr.indexOf("c");
while (-1 !== i) {
c = c + 1;
i = cstr.indexOf("c", i + 1);
}
return c;
}
module.exports = countC;

function countVowels(str) {
let vowels = "aeiou";
let c = 0;
let vowelstr = str.toLowerCase();
for (let i = 0; i < vowelstr.length; i++) {
if (-1 !== vowels.indexOf(vowelstr[i])) {
c = c + 1;
}
}
return c;
}
module.exports = countVowels;

function reverse(string) {
let retstr = "";
for (let i = 0; i < string.length; i++) {
retstr = string[i] + retstr;
}
return retstr;
}
module.exports = reverse;

function isPalindrome(string) {
let i = 0;
let endi = string.length - 1;
while (endi >= i) {
if (string[i] === string[endi]) {
i = i + 1;
endi = endi - 1;
} else {
return false;
}
}
return true;
}
module.exports = isPalindrome;

function sumTogether(arr1, arr2) {
let a = [];
for (let i = 0; i < arr1.length; i++) {
a[i] = arr1[i] + arr2[i];
}
return a;
}
module.exports = sumTogether;

function countElements(elements) {
let countEle = {};
for (let i = 0; i < elements.length; i++) {
if (countEle.hasOwnProperty(elements[i])) {
countEle[elements[i]] = countEle[elements[i]] + 1;
} else {
countEle[elements[i]] = 1;
}
}
return countEle;
}
module.exports = countElements;

function playerHandScore(hand) {
const jqkScore = { "J": 2, "Q": 3, "K": 4 };
let s = 0;
for (let i = 0; i < hand.length; i++) {
s = s + jqkScore[hand[i]];
}
return s;
}
module.exports = playerHandScore;


function willEat(hasPizza, hasDonuts, hasCookies) {
if (hasPizza || hasDonuts || hasCookies) {
return true;
} else {
return false;
}
}
module.exports = willEat;

function double(x) {
const def = x || "Undefined";
if ("Undefined" === def) {
return 0;
} else {
return x * 2;
}
}
module.exports = double;

function canBreathe(isConnected, hasOxygen, aboveWater) {
if (aboveWater) {
return true;
}
if (isConnected && hasOxygen) {
return true;
}
if (isConnected && aboveWater) {
return true;
}
return false;
}
module.exports = canBreathe;

function friendName(friend) {
if (friend) {
if (typeof (friend.name) != "undefined") {
return friend.name;
}
}
}
module.exports = friendName;

function carCrossing(aCrossing, bCrossing) {
if (aCrossing) {
if (bCrossing) {
return false;
} else {
return true;
}
} else {
if (bCrossing) {
return true;
} else {
return false;
}
}
}
module.exports = carCrossing;


function throwError() {
throw new Error("ee error !!.");
}
module.exports = throwError;

function catchError(fn) {
try {
fn();
} catch (ex) {
console.log(ex);
}
}
module.exports = catchError;

function catchError(fn) {
try {
fn();
} catch (ex) {
return ex;
}
return false;
}
module.exports = catchError;

function startError() {
let abc;
abc.prop;
}
module.exports = startError;


function toNumber(string) {
let n = Number(string);
if (isNaN(n)) {
return 0;
} else {
return n;
}
}
module.exports = toNumber;

function combineToString(a, b) {
return String(a) + String(b);
}
module.exports = combineToString;

function isTruthy(a) {
return Boolean(a);
}
module.exports = isTruthy;

function looseEquals(a, b) {
return a == b;
}
module.exports = looseEquals;

function toJSON(obj) {
return JSON.stringify(obj);
}
module.exports = toJSON;

const personJSON = `
{
"name": "jami",
"age": 36,
"isReal": false
}
`;
module.exports = personJSON;
đáp án STRING MANIPULATION


function startsWithX(string) {
let xstring = string.slice(0, 1);
xstring = xstring.toLowerCase();
if (xstring === "x") {
return true;
}
else {
return false;
}
}
module.exports = startsWithX;

function startsWithX(string) {
let xstring = string.slice(0, 1);
xstring = xstring.toLowerCase();
if (xstring === "x") {
return true;
}
else {
return false;
}
}
module.exports = startsWithX;

function endsWithX(string) {
let xstring = string.slice(-1);
xstring = xstring.toLowerCase();
if (xstring !== "x") {
return false;
}
else {
return true;
}
}
module.exports = endsWithX;

function isAllX(string) {
for (let i = 0; i < string.length; i++) {
let xstring = string[i];
xstring = xstring.toUpperCase();
if (xstring !== "X") {
return false;
}
}
return true;
}
module.exports = isAllX;

function findFirstX(string) {
for (let i = 0; i < string.length; i++) {
let xstring = string[i];
if (xstring === "x") {
return i;
}
}
}
module.exports = findFirstX;

function splitAtX(string) {
for (let i = 0; i < string.length; i++) {
let xstring = string[i];
if (xstring === "x") {
xstring1 = string.slice(i + 1, string.length);
xstring2 = string.slice(0, i);
if (xstring1.length < xstring2.length) {
return xstring2;
}
else {
return xstring1;
}
}
}
}
module.exports = splitAtX;


const array = [1, 2, 3];// <-- create an array here!
module.exports = array;

function hasOne(array) {
if (array.indexOf(1) === -1) {
return false;
}
return true;
}
module.exports = hasOne;

function sumEven(array) {
let s = 0;
for (let i = 0; i < array.length; i++) {
if (array[i] % 2 === 0) {
s = s + array[i];
}
}
return s;
}
module.exports = sumEven;

function unique(array) {
let r = [];
for (let i = 0; i < array.length; i++) {
if (r.indexOf(array[i]) === -1) {
r.push(array[i]);
}
}
return r;
}
module.exports = unique;

function addOne(array) {
for (let i = 0; i < array.length; i++) {
array[i] = array[i] + 1;
}
}
module.exports = addOne;

function removeOccurrences(array, num) {
for (let i = array.indexOf(num); i !== -1; i = array.indexOf(num)) {
array.splice(i, 1);
}
}
module.exports = removeOccurrences;


const order = {
pizzas: 2,
extraCheese: true,
deliveryInstructions: "go to build"
};
module.exports = order;

function numberOfPizzas(order) {
return order.pizzas;
}
module.exports = numberOfPizzas;

function numberOfPizzas(orders) {
let s = 0;
for (let i = 0; i < orders.length; i++) {
s = s + orders[i].pizzas;
}
return s;
}
module.exports = numberOfPizzas;

const ORDER_TYPES = {
PIZZA: 0,
SALAD: 1,
FRIES: 2
}
module.exports = ORDER_TYPES;

const ORDER_TYPES = require('./orderTypes');
function numberOfPizzas(orders) {
let s = 0;
for (let i = 0; i < orders.length; i++) {
if (orders[i].type === ORDER_TYPES.PIZZA) {
s = s + orders[i].pizzas;
}
}
return s;
}
module.exports = numberOfPizzas;

function numberOfKeys(object) {
let n = 0;
for (let key in object) {
n = n + 1;
}
return n;
}
module.exports = numberOfKeys;

function removeSecret(object) {
delete object.secret
}
module.exports = removeSecret;


function shortestString(str1, str2) {
if (str1.length < str2.length) {
return str1;
} else {
return str2;
}
}
module.exports = shortestString;

function halfValue(numbers) {
let retarr = [];
for (let i = 0; i < numbers.length; i++) {
if (0 === numbers[i] % 2) {
retarr.push(numbers[i] / 2);
} else {
let tmp = Math.floor(numbers[i] / 2) + 1;
retarr.push(tmp);
}
}
return retarr;
}
module.exports = halfValue;

function countC(str) {
let c = 0;
let cstr = str.toLowerCase();
let i = cstr.indexOf("c");
while (-1 !== i) {
c = c + 1;
i = cstr.indexOf("c", i + 1);
}
return c;
}
module.exports = countC;

function countVowels(str) {
let vowels = "aeiou";
let c = 0;
let vowelstr = str.toLowerCase();
for (let i = 0; i < vowelstr.length; i++) {
if (-1 !== vowels.indexOf(vowelstr[i])) {
c = c + 1;
}
}
return c;
}
module.exports = countVowels;

function reverse(string) {
let retstr = "";
for (let i = 0; i < string.length; i++) {
retstr = string[i] + retstr;
}
return retstr;
}
module.exports = reverse;

function isPalindrome(string) {
let i = 0;
let endi = string.length - 1;
while (endi >= i) {
if (string[i] === string[endi]) {
i = i + 1;
endi = endi - 1;
} else {
return false;
}
}
return true;
}
module.exports = isPalindrome;

function sumTogether(arr1, arr2) {
let a = [];
for (let i = 0; i < arr1.length; i++) {
a[i] = arr1[i] + arr2[i];
}
return a;
}
module.exports = sumTogether;

function countElements(elements) {
let countEle = {};
for (let i = 0; i < elements.length; i++) {
if (countEle.hasOwnProperty(elements[i])) {
countEle[elements[i]] = countEle[elements[i]] + 1;
} else {
countEle[elements[i]] = 1;
}
}
return countEle;
}
module.exports = countElements;

function playerHandScore(hand) {
const jqkScore = { "J": 2, "Q": 3, "K": 4 };
let s = 0;
for (let i = 0; i < hand.length; i++) {
s = s + jqkScore[hand[i]];
}
return s;
}
module.exports = playerHandScore;


function willEat(hasPizza, hasDonuts, hasCookies) {
if (hasPizza || hasDonuts || hasCookies) {
return true;
} else {
return false;
}
}
module.exports = willEat;

function double(x) {
const def = x || "Undefined";
if ("Undefined" === def) {
return 0;
} else {
return x * 2;
}
}
module.exports = double;

function canBreathe(isConnected, hasOxygen, aboveWater) {
if (aboveWater) {
return true;
}
if (isConnected && hasOxygen) {
return true;
}
if (isConnected && aboveWater) {
return true;
}
return false;
}
module.exports = canBreathe;

function friendName(friend) {
if (friend) {
if (typeof (friend.name) != "undefined") {
return friend.name;
}
}
}
module.exports = friendName;

function carCrossing(aCrossing, bCrossing) {
if (aCrossing) {
if (bCrossing) {
return false;
} else {
return true;
}
} else {
if (bCrossing) {
return true;
} else {
return false;
}
}
}
module.exports = carCrossing;


function throwError() {
throw new Error("ee error !!.");
}
module.exports = throwError;

function catchError(fn) {
try {
fn();
} catch (ex) {
console.log(ex);
}
}
module.exports = catchError;

function catchError(fn) {
try {
fn();
} catch (ex) {
return ex;
}
return false;
}
module.exports = catchError;

function startError() {
let abc;
abc.prop;
}
module.exports = startError;


function toNumber(string) {
let n = Number(string);
if (isNaN(n)) {
return 0;
} else {
return n;
}
}
module.exports = toNumber;

function combineToString(a, b) {
return String(a) + String(b);
}
module.exports = combineToString;

function isTruthy(a) {
return Boolean(a);
}
module.exports = isTruthy;

function looseEquals(a, b) {
return a == b;
}
module.exports = looseEquals;

function toJSON(obj) {
return JSON.stringify(obj);
}
module.exports = toJSON;

const personJSON = `
{
"name": "jami",
"age": 36,
"isReal": false
}
`;
module.exports = personJSON;
No activity yet