This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const formElemList = document.querySelectorAll("form"); | |
formElemList.forEach((form) => { | |
form.addEventListener("submit", (e) => { | |
// on form submission, prevent default | |
e.preventDefault(); | |
// construct a FormData object, which fires the formdata event | |
new FormData(form); | |
}); | |
form.addEventListener("formdata", (e) => { |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import 'package:flutter/material.dart'; | |
import 'package:wave/wave.dart'; | |
import 'package:wave/config.dart'; | |
void main() => runApp(MyApp()); | |
class MyApp extends StatelessWidget { | |
@override | |
Widget build(BuildContext context) { | |
return MaterialApp( |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//"Write a program that prints the numbers from 1 to 100. But for multiples of three print “Fizz” instead of the number and for the multiples of five print “Buzz”. For numbers which are multiples of both three and five print “FizzBuzz”." | |
void main() { | |
for (int i = 1; i <= 100; i++) { | |
bool a = i % 3 == 0; | |
bool b = i % 5 == 0; | |
if (a && b) { | |
print("FizzBuzz"); | |
} else if (a) { |