What do you want to save?
Add Code snippet
New code examples
-
TypeScript 2021-09-06 15:00:02
how to cycle through an array js
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Javascript 2021-09-03 16:22:02
console.log('Hi there!');
console.log('Hello World'); console.error('This is an error'); console.warn('This is a warning'); console.dir(document); console.log(document.URL); console.table([{name: 'Anthony', email: 'test.com', age: 33}]); console.clear(); console.group('Say Hello'... Add solution -
Javascript 2021-09-03 10:58:01
How do you detect whether or not a word is a palindrome in javascript
function palindrome(str) { // Step 1. The first part is the same as earlier var re = /[^A-Za-z0-9]/g; // or var re = /[\W_]/g; str = str.toLowerCase().replace(re, ''); // Step 2. Create the FOR loop var len = str.length; // var len = "A man, a ... Add solution -
VBA 2021-09-02 22:52:01
excel vba exit for next loop
'In VBA how to exit a For Next loop when a condition 'is met: use Exit For. For i = 1 To 1000 c = c + 1 If c = 750 Then Exit For Next 'Exit For can also be used inside a For Each loop: For Each r In [A1:A10] c = c + c If r.Value = "Hi&qu... Add solution -
Javascript 2021-09-01 04:49:03
loop through an array in javascript
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Javascript 2021-08-30 20:55:01
javascript code to loop through array
var data = [1, 2, 3, 4, 5, 6]; // traditional for loop for(let i=0; i<=data.length; i++) { console.log(data[i]) // 1 2 3 4 5 6 } // using for...of for(let i of data) { console.log(i) // 1 2 3 4 5 6 } // using for...in for(let i in data) { con... Add solution -
Java 2021-08-30 17:32:01
java convert hex to binary method
/** * Method receives String hexadecimal value (of any range) and returns a String of a binary representation * hexadecimal string format (ex.:"2FFA") * Use of if-than-else statement inside for loop * Use the Integer.toBinaryString(int i) me... Add solution -
Python 2021-08-30 14:00:02
python matrix calculation
# A basic code for matrix input from user R = int(input("Enter the number of rows:")) C = int(input("Enter the number of columns:")) # Initialize matrix matrix = [] print("Enter the entries rowwise:") # For use... Add solution
Best helpers
Derek Kaplan
+5
Ryo Hirai
+5
Sqlsourcerer
+5
Pierus
+5
Ken N.
+5
Rene Duchamp
+5
Susette87
+5
Tanveer Ali
+5
Simon LANG
+5
NeoNosliw
+5
Littleprince
+5
Bridget W.
+5
Haidy Kassem
+5
Ferhat Turan
+5
Jwp36
+5
Andrew Besag
+5