What do you want to save?
Add Code snippet
New code examples
-
Javascript 2021-10-01 10:17:04
store data in browser javascript
// localStorage for objects, arrays or any data type var obj = { firstName: "Bob", lastName: "Jeff", age: 13 } localStorage.setItem("itemname", JSON.stringify(obj)); // Save the obj as string var item = JSON.parse(lo... Add solution -
-
Java 2021-09-06 18:15:02
calculate average java
Just some minor modification to your code will do (with some var renaming for clarity) : double sum = 0; //average will have decimal point for(int i=0; i < args.length; i++){ //parse string to double, note that this might fail if you encounter a n... Add solution
Best helpers
+5
+5
+5
+5
+5
+5
+5
+5
+5