What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-11-20 11:33:23
number to array js
const myNumber = 1245; function numberToArray(number) { let array = number.toString().split("");//stringify the number, then make each digit an item in an array return array.map(x => parseInt(x));//convert all the items back into number... Add solution -
Java 2021-11-08 20:33:21
stream java example
the Stream API is used to process collections of objects. A stream is a sequence of objects that supports various methods which can be pipelined to produce the desired result. It is very similar to build().perform() method in Actions class. It is cha... Add solution -
Java 2021-11-07 12:13:09
java count frequency of characters in a string
+++METHOD WITH NONDUP+++ public static String FrequencyOfChars(String str) { String nonDup = ""; for(int i=0; i < str.length(); i++) if(!nonDup.contains(""+str.charAt(i))) nonDup+= ""+str.charAt(i); String expectedRe... Add solution -
Other 2021-11-05 01:39:11
Write Number in Expanded Form You will be given a number and you will need to return it as a string in Expanded Form. For example:
const expandedForm = n => n.toString() .split("") .reverse() .map( (a, i) => a * Math.pow(10, i)) .filter(a => a > 0) ... Add solution -
Other 2021-10-28 17:16:06
complementary dna
function DNAStrand(dna) { const arrayDNA = dna.split(""); let complementaryDNA = ""; arrayDNA.forEach((base) => { if (base === "A") complementaryDNA += "T"; if (base === "T") complementar... Add solution
Best helpers
+10
+5
+5
+5
+5
+5
+5
+5
+5
+5