What do you want to save?
Add Code snippet
New code examples
-
Html 2022-03-27 19:55:09
show image inside table with innerhtml
var array = cvpls(); var table = ``; for (var i = 0; i < array.length; i++) { table += `<tr>`; for (var j = 0; j < array[i].length; j++) { if (i === 1 && j === 2) { table += `<td><img src='http://imgh.us/statik.g... Add solution -
Other 2022-03-27 18:30:09
validar si un numero es par javascript map
// Return a new array where even numbers are multiplied by 2 let arr = [1, 2, 3, 4, 5, 6, 7] function consoleEven(arr) { let data = arr.map((num) => (num % 2 === 0 ? num * 2 : num * 1)) console.log(data) // [1, 4, 3, 8, 5, 12, 7] } // ? is... Add solution -
Javascript 2022-03-27 11:30:14
how to check consecutive characters in javascript
var password = '5236aaa121'; for(var i = 0; i< password.length; i++) { var numberOfRepeats = CheckForRepeat(i, password, password.charAt(i)); //do something } function CheckForRepeat(startIndex, originalString, charToCheck) { var repeatC... Add solution -
Javascript 2022-03-27 08:50:21
3. What are private member variables. in js
function ConstructorCar(initValue) { this.publicMember = initValue; let _privateMember = initValue; //private member this.getPrivateMember = function() { return _privateMember; } this.setPrivateMember = function(v) { _privateMember = v; }}Construc... Add solution -
Javascript 2022-03-19 10:15:11
string methods javascript count number of words inside a string
<html> <body> <script> function countWords(str) { str = str.replace(/(^\s*)|(\s*$)/gi,""); str = str.replace(/[ ]{2,}/gi," "); str = str.replace(/\n /,"\n"); return str.split(' ').length; }... Add solution -
Other 2022-03-19 02:55:50
Check first character of string in array and compare to another array
a = ['ghis', 'rs', 'ea','eat' ,'nentence'] let word = '' function check(arr){ let color = ['green'] for(let i = 0; i < arr.length;i++){ word += arr[i][0] } for(let j = 0;j < color.length;j++){ if(word == color[j]){ return tru... Add solution
Best helpers
Gabi Purcaru
+5
L. Samson
+5
Yoyo
+5
Skry
+5
Colocvial
+5
Sarah witte
+5
Leosar
+5
Tobiak777
+5
Tjd
+5