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
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<link | |
href="https://fonts.googleapis.com/css2?family=Cookie&display=swap" | |
rel="stylesheet" | |
/> |
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
vvvv |
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
void main() { | |
double hourlyRate = -0.5; | |
int hoursWorked = 12; | |
print(computeWages(hourlyRate , hoursWorked)); | |
} | |
computeWages (hourlyRate , hoursWorked) { | |
var wages = hourlyRate * hoursWorked; | |
if(hourlyRate<=0||hoursWorked<=0){ | |
throw('Negative values not allowed'); | |
} |
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
void main() { | |
String username = "Kuria"; | |
print ( sendGreeting(username)); | |
} | |
String sendGreeting(username){ | |
var friendsList = [ | |
"Moses", | |
"Kuria", | |
"Uket", | |
"Regina", |
NewerOlder