When to use: Acquaintances, neighbors, landlords, colleagues
Key Features:
Greeting: “Dear [Mr./Ms. Last Name]”
Tone: Polite but friendly
Language: Some contractions acceptable
Sign-off: “Kind regards,” or “Best wishes,”
`;
}
else {
content = `
Informal Letter Guide
When to use: Friends, family members
Key Features:
Greeting: “Dear [First Name]” or “Hi [First Name]”
Tone: Casual, conversational
Language: Contractions, idioms acceptable
Sign-off: “Best regards,” “Cheers,” or “Love,”
`;
}
contentDiv.innerHTML = content;
}
// Show letter examples
function showExample(type) {
const contentDiv = document.getElementById(‘details-content’);
let example = ”;
if (type === ‘formal’) {
example = `
Dear Sir/Madam,
I am writing to express my dissatisfaction with the service I received at your hotel during my recent stay from June 1-3, 2023.
The room was not cleaned properly, and the air conditioning was not functioning. Furthermore, the staff were unresponsive to my complaints.
I would appreciate a refund for one night’s stay and assurance that these issues will be addressed for future guests.
Yours faithfully, Robert Johnson
`;
}
else if (type === ‘semi-formal’) {
example = `
Dear Mr. Thompson,
I hope this letter finds you well. I’m writing about the noise coming from your apartment late at night.
While I understand everyone needs to relax, the music after 11pm makes it difficult to sleep. Could we agree on quiet hours after 10:30pm?
I’d appreciate your cooperation on this matter. Please let me know if you’d like to discuss this in person.
Kind regards, Sarah Williams
`;
}
else {
example = `
Hi Maria,
Guess what? I finally moved into my new house last weekend! It’s been crazy unpacking everything.
The house has 3 bedrooms and a small garden – perfect for the dog! The neighborhood seems friendly too, with a park just down the street.
You should come visit next month! I’ll send you directions and you can stay in the guest room.
Best, Sophie
`;
}
contentDiv.insertAdjacentHTML(‘beforeend’, example);
}
// Drag and drop functions for matching game
function allowDrop(ev) {
ev.preventDefault();
}
function drag(ev) {
ev.dataTransfer.setData(“text”, ev.target.dataset.function);
}
function drop(ev) {
ev.preventDefault();
const data = ev.dataTransfer.getData(“text”);
const targetFunction = ev.target.dataset.function;
if (data === targetFunction) {
ev.target.style.backgroundColor = ‘#e8f8f5’;
ev.target.innerHTML += `