{{ message }}

Instantly share code, notes, and snippets.

# McLaren College McLarenCollege

Last active Sep 17, 2021
DayWiseChallengesF5
View DayWiseChallengesF5.md
Day 1
In-class challenges Homework freeCodeCamp
Last active Sep 15, 2021
Set Up Instructios for Foundations Batch
View setupInstructions.md

# Set Up Instructions

• Complete the set up by or before the deadline mentioned in the enrollment email

• If you have any problem in the set up you must tell us on Discord along with a clear description of the problem.

## 1.Set Up VSCode and Nodejs

• Watch the video in the link to setup Github and other things and make sure to use your first and last name in your GitHub Profile.
Last active Aug 31, 2021
Practice Challenge 3
View PracticeChallenge3.md

# Challenge-1

Write a function that accepts two strings and checks whether the first string is an anagram of the second string. If yes, the function returns true , else it returns false. The case(upper/lower)of the character MATTERS.

For eg.

```function isAnagarm(str1,str2){
}
console.log(isAnagarm("Silent","liSten"));//=>true```
Last active Aug 23, 2021

Given a person's age and a day ,write the code for the following scenario:

If the person is an Adult (age >=18) , the ticket price on Weekends is 100 and on weekdays is 80.

If the person is a child (age <18), the ticket price is always half of the adult price for that particular day.

```let age = 15;
let day = "Sunday";```
Last active Aug 23, 2021
Ticket Price
View ticketPrice.md

Given two variables age and day, write code to determine the ticket price as per the following rules :

• For a child (age less than 12) the ticket price is always 50.

• For a senior citizen(age greater than or equal to 65):

``````i) if it is weekend (Saturday/Sunday) the price is 70.

ii)if it is a  weekday the price is 80.
``````
• For everybody else the price is always 100.

Last active Aug 23, 2021
Cinema Hall If-Else
View cinemaHallIfElse.md

A cinema is showing movie to childeren (age < 18) for free and charging adults (age >= 18) with \$10 per ticket.

Write if-else statements to print the following messages according to the given age.

For adults print the following messages to the console:

```Please pay \$10.
Please proceed to the cinema hall.```

For children print the following message to the console:

Last active Aug 23, 2021
Party Time
View partyTime.md

Intitialize the currentDay, currentMonth and currentYear variables with the values for the current day.

Given the details of Anu's birthday write a boolean expression to check if today is Party Time (Anu's birthday) by comparing it with the details for the current day.

```let anuBirthDay = 26;
let anuBirthMonth = "August";
let anuBirthYear = 1986;

let currentDay = ; //Initialize with current Day
let currentMonth = ; //Initialize with current Month```
Last active Jun 2, 2021
Foundations Syllabus
View foundationsSyllabus.md

# Foundations Course Syllabus

• Basic Data Types and Operators (String, Number, +, -)
• Variables (Declaration, Assignment, Naming rules)
• Compound Expressions (%, ++, --, +=)
• Boolean data type and logical operators (or, and, not)
• If/else and Ternary Operator
• Functions
• Arrays and Loops
• Objects
• Array and String Methods
Last active Jun 1, 2021
Function Trace 3
View function_trace_3.js
 //FUNCTION TRACE 3 // Requirements: Create a trace output file showing each function call // including parameter values, and each return value. You should be able // to step through with pen and paper - do not run the code on your computer // Tip: To refresh your memory of how to write trace output, see this gist: // https://gist.github.com/McLarenCollege/e276ecc7dc3485a483be469f61dfd671 function foo(koo, y) { if ((koo % 3) !== 0) {
Last active Jun 1, 2021
View averageOfNumbers.md
• Part 1 - Write a function that takes two numbers and returns the average of the two numbers.

• Part 2 - Write a second function to calculate the average of 3 numbers by extending the code written in the first function.