Skip to content

Instantly share code, notes, and snippets.

https://repl.it/@ariannac1/Area-of-a-Rectangle-Drill
https://repl.it/@ariannac1/temperature-conversion
https://repl.it/@ariannac1/Is-Divisible
@acarter43
acarter43 / String Drills
Last active November 14, 2017 14:42
String Drills
https://repl.it/@ariannac1/wisePerson
https://repl.it/@ariannac1/What-to-Shout
https://repl.it/@ariannac1/text-normalizer
class Pet
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
class Cat
attr_reader :color, :breed
attr_accessor :name
def initialize(color, breed)
@color = color
@breed = breed
@hungry = true
end
def fav_foods
# code for this method goes in here
food_array = [] # instead of the brackets, you can also use Array.new to make a new empty array
3.times do
puts "Name a favorite food."
food_array << gets.chomp
puts "Your favorite foods are #{food_array.join(", ")}."
end
if (5+5==10)
puts "this is true"
else
puts "this is false"
end
#my_name = "Ari"
def greeting
puts "Ari:"
name = "gets.chomp"
puts "Hello" + " " + name
end
greeting
// Maps
var marker;
function initMap() {
var map = new google.maps.Map(document.getElementById('map'), {
center: {lat: 52.53762, lng: 13.39597},
zoom: 8
});
}
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1">
<!-- The above 3 meta tags *must* come first in the head; any other head content must come *after* these tags -->
<title>ARICARTER- website developer in Los Angeles</title>
$(document).ready(function(){
$(".contact-submit").on("click", function(){
console.log("clicked");
var comment = $(".message-box").val();
if (comment="") {
$(".message-box").css("border", "2px solid red");
} else {
console.log(comment);
$("#visible-comment").html(comment);