This document provides an overview of basic JavaScript concepts including variables, functions, conditional statements, loops and recursion. It includes code examples and assignments for each concept. The assignments demonstrate core JavaScript syntax and increase in complexity, covering if/else statements, switch cases, while/do-while/for loops, and recursive functions for calculating factorials and Fibonacci series. Later assignments involve more complex tasks like printing multiple patterns and combining different statements. The document serves as a learning guide for JavaScript fundamentals.
You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features (lambda expressions and method references) and APIs (Streams, Optional and CompletableFutures) inspired from functional ideas such as first-class functions, composition and immutability.
However, what does this mean for my existing codebase?
In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner.
We will discuss:
- How to adapt to requirement changes using first-class functions
- How you can enhance code reusability using currying
- How you can make your code more robust by favouring immutability over mutability
- How you can design better APIs and reduce unintended null pointer exceptions using an optional data type"
This presentation gives a pragmatic introduction to SBT - the Scala Build Tool - in 7 examples. Each example is a build in it's own root directory: ./example?? Beginning with very simple sbt examples the later examples are becoming more structured and more complex showing multi-project builds, cross version builds, packaging and publishing, custom Settings and Tasks and the integration of the Ammonite REPL into your build. We also look at InputTasks, Commands and plugin development.
Workshop JavaScript Testing. Frameworks. Client vs Server Testing. Jasmine. Chai. Nock. Sinon. Spec Runners: Karma. TDD. Code coverage. Building a testable JS app.
Presentado por ing: Raúl Delgado y Mario García
The fundamentals and advance application of Node will be covered. We will explore the design choices that make Node.js unique, how this changes the way applications are built and how systems of applications work most effectively in this model. You will learn how to create modular code that’s robust, expressive and clear. Understand when to use callbacks, event emitters and streams.
Introduction to reactive programming & ReactiveCocoaFlorent Pillet
A short introduction to the concepts of functional reactive programming, and their implementation in ReactiveCocoa, a framework for iOS and OS X developers.
This speech was given at CocoaHeads Paris, October 9th 2014
Pragmatic functional refactoring with java 8 (1)RichardWarburton
You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features (lambda expressions and method references) and APIs (Streams, Optional and CompletableFutures) inspired from functional ideas such as first-class functions, composition and immutability.
However, what does this mean for my existing codebase?
In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner.
We will discuss:
* How to adapt to requirement changes using first-class functions
* How you can enhance code reusability using currying
* How you can make your code more robust by favouring immutability over mutability
* How you can design better APIs and reduce unintended null pointer exceptions using an optional data type
You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features (lambda expressions and method references) and APIs (Streams, Optional and CompletableFutures) inspired from functional ideas such as first-class functions, composition and immutability.
However, what does this mean for my existing codebase?
In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner.
We will discuss:
- How to adapt to requirement changes using first-class functions
- How you can enhance code reusability using currying
- How you can make your code more robust by favouring immutability over mutability
- How you can design better APIs and reduce unintended null pointer exceptions using an optional data type"
This presentation gives a pragmatic introduction to SBT - the Scala Build Tool - in 7 examples. Each example is a build in it's own root directory: ./example?? Beginning with very simple sbt examples the later examples are becoming more structured and more complex showing multi-project builds, cross version builds, packaging and publishing, custom Settings and Tasks and the integration of the Ammonite REPL into your build. We also look at InputTasks, Commands and plugin development.
Workshop JavaScript Testing. Frameworks. Client vs Server Testing. Jasmine. Chai. Nock. Sinon. Spec Runners: Karma. TDD. Code coverage. Building a testable JS app.
Presentado por ing: Raúl Delgado y Mario García
The fundamentals and advance application of Node will be covered. We will explore the design choices that make Node.js unique, how this changes the way applications are built and how systems of applications work most effectively in this model. You will learn how to create modular code that’s robust, expressive and clear. Understand when to use callbacks, event emitters and streams.
Introduction to reactive programming & ReactiveCocoaFlorent Pillet
A short introduction to the concepts of functional reactive programming, and their implementation in ReactiveCocoa, a framework for iOS and OS X developers.
This speech was given at CocoaHeads Paris, October 9th 2014
Pragmatic functional refactoring with java 8 (1)RichardWarburton
You may be hearing a lot of buzz around functional programming. For example, Java 8 recently introduced new features (lambda expressions and method references) and APIs (Streams, Optional and CompletableFutures) inspired from functional ideas such as first-class functions, composition and immutability.
However, what does this mean for my existing codebase?
In this talk we show how you can refactor your traditional object-oriented Java to using FP features and APIs from Java 8 in a beneficial manner.
We will discuss:
* How to adapt to requirement changes using first-class functions
* How you can enhance code reusability using currying
* How you can make your code more robust by favouring immutability over mutability
* How you can design better APIs and reduce unintended null pointer exceptions using an optional data type
A while loop in C programming
repeatedly executes a target
statement as long as a given
condition is true.
A while loop in C programming
repeatedly executes a target
statement as long as a given
condition is true.
ServiceNow Knowledge11 Advanced Scripting & Debugging LabJohn Roberts
In this advanced hands-on workshop you will work with a variety of debugging tools to troubleshoot client and server scripting. You'll learn how to add error handling and debugging assistance to your scripts. We will review some advanced scripting techniques including server-side script includes extending base classes and AJAX client requests. As we will not be covering basic scripting concepts in this session participants will require some understanding of JavaScript and scripting within ServiceNow.
This slide is special for master students (MIBS & MIFB) in UUM. Also useful for readers who are interested in the topic of contemporary Islamic banking.
June 3, 2024 Anti-Semitism Letter Sent to MIT President Kornbluth and MIT Cor...Levi Shapiro
Letter from the Congress of the United States regarding Anti-Semitism sent June 3rd to MIT President Sally Kornbluth, MIT Corp Chair, Mark Gorenberg
Dear Dr. Kornbluth and Mr. Gorenberg,
The US House of Representatives is deeply concerned by ongoing and pervasive acts of antisemitic
harassment and intimidation at the Massachusetts Institute of Technology (MIT). Failing to act decisively to ensure a safe learning environment for all students would be a grave dereliction of your responsibilities as President of MIT and Chair of the MIT Corporation.
This Congress will not stand idly by and allow an environment hostile to Jewish students to persist. The House believes that your institution is in violation of Title VI of the Civil Rights Act, and the inability or
unwillingness to rectify this violation through action requires accountability.
Postsecondary education is a unique opportunity for students to learn and have their ideas and beliefs challenged. However, universities receiving hundreds of millions of federal funds annually have denied
students that opportunity and have been hijacked to become venues for the promotion of terrorism, antisemitic harassment and intimidation, unlawful encampments, and in some cases, assaults and riots.
The House of Representatives will not countenance the use of federal funds to indoctrinate students into hateful, antisemitic, anti-American supporters of terrorism. Investigations into campus antisemitism by the Committee on Education and the Workforce and the Committee on Ways and Means have been expanded into a Congress-wide probe across all relevant jurisdictions to address this national crisis. The undersigned Committees will conduct oversight into the use of federal funds at MIT and its learning environment under authorities granted to each Committee.
• The Committee on Education and the Workforce has been investigating your institution since December 7, 2023. The Committee has broad jurisdiction over postsecondary education, including its compliance with Title VI of the Civil Rights Act, campus safety concerns over disruptions to the learning environment, and the awarding of federal student aid under the Higher Education Act.
• The Committee on Oversight and Accountability is investigating the sources of funding and other support flowing to groups espousing pro-Hamas propaganda and engaged in antisemitic harassment and intimidation of students. The Committee on Oversight and Accountability is the principal oversight committee of the US House of Representatives and has broad authority to investigate “any matter” at “any time” under House Rule X.
• The Committee on Ways and Means has been investigating several universities since November 15, 2023, when the Committee held a hearing entitled From Ivory Towers to Dark Corners: Investigating the Nexus Between Antisemitism, Tax-Exempt Universities, and Terror Financing. The Committee followed the hearing with letters to those institutions on January 10, 202
The simplified electron and muon model, Oscillating Spacetime: The Foundation...RitikBhardwaj56
Discover the Simplified Electron and Muon Model: A New Wave-Based Approach to Understanding Particles delves into a groundbreaking theory that presents electrons and muons as rotating soliton waves within oscillating spacetime. Geared towards students, researchers, and science buffs, this book breaks down complex ideas into simple explanations. It covers topics such as electron waves, temporal dynamics, and the implications of this model on particle physics. With clear illustrations and easy-to-follow explanations, readers will gain a new outlook on the universe's fundamental nature.
This presentation includes basic of PCOS their pathology and treatment and also Ayurveda correlation of PCOS and Ayurvedic line of treatment mentioned in classics.
How to Build a Module in Odoo 17 Using the Scaffold MethodCeline George
Odoo provides an option for creating a module by using a single line command. By using this command the user can make a whole structure of a module. It is very easy for a beginner to make a module. There is no need to make each file manually. This slide will show how to create a module using the scaffold method.
This presentation was provided by Steph Pollock of The American Psychological Association’s Journals Program, and Damita Snow, of The American Society of Civil Engineers (ASCE), for the initial session of NISO's 2024 Training Series "DEIA in the Scholarly Landscape." Session One: 'Setting Expectations: a DEIA Primer,' was held June 6, 2024.
A Strategic Approach: GenAI in EducationPeter Windle
Artificial Intelligence (AI) technologies such as Generative AI, Image Generators and Large Language Models have had a dramatic impact on teaching, learning and assessment over the past 18 months. The most immediate threat AI posed was to Academic Integrity with Higher Education Institutes (HEIs) focusing their efforts on combating the use of GenAI in assessment. Guidelines were developed for staff and students, policies put in place too. Innovative educators have forged paths in the use of Generative AI for teaching, learning and assessments leading to pockets of transformation springing up across HEIs, often with little or no top-down guidance, support or direction.
This Gasta posits a strategic approach to integrating AI into HEIs to prepare staff, students and the curriculum for an evolving world and workplace. We will highlight the advantages of working with these technologies beyond the realm of teaching, learning and assessment by considering prompt engineering skills, industry impact, curriculum changes, and the need for staff upskilling. In contrast, not engaging strategically with Generative AI poses risks, including falling behind peers, missed opportunities and failing to ensure our graduates remain employable. The rapid evolution of AI technologies necessitates a proactive and strategic approach if we are to remain relevant.
বাংলাদেশের অর্থনৈতিক সমীক্ষা ২০২৪ [Bangladesh Economic Review 2024 Bangla.pdf] কম্পিউটার , ট্যাব ও স্মার্ট ফোন ভার্সন সহ সম্পূর্ণ বাংলা ই-বুক বা pdf বই " সুচিপত্র ...বুকমার্ক মেনু 🔖 ও হাইপার লিংক মেনু 📝👆 যুক্ত ..
আমাদের সবার জন্য খুব খুব গুরুত্বপূর্ণ একটি বই ..বিসিএস, ব্যাংক, ইউনিভার্সিটি ভর্তি ও যে কোন প্রতিযোগিতা মূলক পরীক্ষার জন্য এর খুব ইম্পরট্যান্ট একটি বিষয় ...তাছাড়া বাংলাদেশের সাম্প্রতিক যে কোন ডাটা বা তথ্য এই বইতে পাবেন ...
তাই একজন নাগরিক হিসাবে এই তথ্য গুলো আপনার জানা প্রয়োজন ...।
বিসিএস ও ব্যাংক এর লিখিত পরীক্ষা ...+এছাড়া মাধ্যমিক ও উচ্চমাধ্যমিকের স্টুডেন্টদের জন্য অনেক কাজে আসবে ...
Executive Directors Chat Leveraging AI for Diversity, Equity, and InclusionTechSoup
Let’s explore the intersection of technology and equity in the final session of our DEI series. Discover how AI tools, like ChatGPT, can be used to support and enhance your nonprofit's DEI initiatives. Participants will gain insights into practical AI applications and get tips for leveraging technology to advance their DEI goals.
Thinking of getting a dog? Be aware that breeds like Pit Bulls, Rottweilers, and German Shepherds can be loyal and dangerous. Proper training and socialization are crucial to preventing aggressive behaviors. Ensure safety by understanding their needs and always supervising interactions. Stay safe, and enjoy your furry friends!
Introduction to AI for Nonprofits with Tapp NetworkTechSoup
Dive into the world of AI! Experts Jon Hill and Tareq Monaur will guide you through AI's role in enhancing nonprofit websites and basic marketing strategies, making it easy to understand and apply.
Macroeconomics- Movie Location
This will be used as part of your Personal Professional Portfolio once graded.
Objective:
Prepare a presentation or a paper using research, basic comparative analysis, data organization and application of economic information. You will make an informed assessment of an economic climate outside of the United States to accomplish an entertainment industry objective.
Strategies for Effective Upskilling is a presentation by Chinwendu Peace in a Your Skill Boost Masterclass organisation by the Excellence Foundation for South Sudan on 08th and 09th June 2024 from 1 PM to 3 PM on each day.
2. Content
Tables Of Content:-
1.1What Is Javascript?
1.2 JavascriptVariables
1.3 Functions
1.4 JavascriptVariable Scope
1.5 If Else Loop
1.6 Switch Case
1.7While-Loop
1.8 Do-while loop
1.9 For Loop
1.10 Factorial of a number
1.10.1 Factorial Approach
1.10.2 Recursive Approach
2.0 Fibonacci Series
Assignment :-
Assignment No:-1 Display Hello world
Assignment No:-2 HelloWorld In Head
Assignment no :-3 StoringValues InVariables and
Print It
Assignment no:-04 Declare Global And Local
Variables
Assignment no:-05 If Statement
Assignment no:-06 If Else Statement
Assignment no:-07 If Else If
Assignment no:-08 Switch Case
Assignment no:-09 While loop
Assignment no:-10 Do - While
Assignment no:-11 For-Loop
Assignment no:-12 IterativeApproach In Factorial
Assignment no:-13 Factorial Recursive Approach
Assignment no:-14 Recursion in Fibonanci Series
Assignment no:-15 Fibonanci Series
Task:-
1.0Task No:-1
2.0Task No:-2
3.0Task No:-3
4.0Task No:-4
5.0Task No:-5
6.0Task No:-6
7.0Task No:-7
3. 1.1 What is JavaScript?
JavaScript is a dynamic computer programming language. It is lightweight and
most commonly used as a part of web pages, whose implementations allow client-
side script to interact with the user and make dynamic pages. It is an interpreted
programming language with object-oriented capabilities.
Build In 1995.
Designed for creating network-centric applications
Complementary to and integrated with Java
Complementary to and integrated with Java
8. 1.2 JavaScriptVariables:-
• Like many other programming languages, JavaScript has variables.Variables can be
thought of as named containers.You can place data into these containers and then refer
to the data simply by naming the container.
<script>
var money;
var name;
</script>
9. Assignment no :-3
• StoringValue inVariable And Print it
<script>
var name = “Boney”;
var money;
money = 2000;
Document.write(name);
Console.log(money) ;
</script>
10. 1.3 Functions
• Functions are the main “building blocks” of the program.They allow the code to be called many times without repetition.
<script>
function showMessage()
{
alert( 'Hello everyone!’ );
}
showMessage();
</script>
11. 1.4 JavaScriptVariable Scope
The scope of a variable is the region of your program in which it is defined.
JavaScript variables have only two scopes
• GlobalVariables: A global variable has global scope which means it can be
defined anywhere in your JavaScript code.
• LocalVariables: A local variable will be visible only within a function where
it is defined. Function parameters are always local to that function.
12. Assignment no:-04
• Declare Global And LocalVariable
<script>
var myVar=“global”;
function checkscope()
{
var myVar=“Local”;
document.write(myVar);
}
</script>
13. Task No :- 03
• Declare Add, Multiply & Divide in Function
• Then Declare one thing add , multiply or divide in global or local variable
14. 1.5 If Else Loop:-
While writing a program, there may be a situation when you need to adopt one out of a
given set of paths. In such cases, you need to use conditional statements that allow your
program to make correct decisions and perform right actions.
JavaScript supports the following forms of if..else statement:
1) if statement
2) if...else statement
3) if...else if... Statement
if Statement :-The ‘if’ statement is the fundamental control statement that allows
JavaScript to make decisions and execute statements conditionally.
15. Assignment no:-05
• If Statement
<body>
<script>
var age = 20;
If (age > 18)
{
document.write(“<b>Qualify for driving</b>”);
}
</script>
</body>
16. Assignment no:-06
• If Else Statement:-
<script>
var age = 15 ;
If ( age > 18 )
{
document.write(“ qualify for driving”);
}
else
{
document.write(“Does not Qualify for Driving”);
}
</script>
17. Assignment no:-07
• if...else if... Statement
<script>
var book = “maths”;
If ( book == “history” )
{
document.write(“history book”);
}
else if (book == “maths” )
{
document.write(“book found”);
}
else
{
document.write(“Unkown book”);
}
</script>
18. Task No :- 04
• Perform different Output for
• If statement
• If else
• Else if
19. 1.6 Switch-Case
• You can use multiple if...else…if statements, to perform a multiway branch.
However, this is not always the best solution, especially when all of the branches
depend on the value of a single variable.
• you can use a switch statement which handles exactly this situation, and it does so
more efficiently than repeated if...else if statements.
21. Assignment no:-08
• Switch-Case
<script>
var grade='A';
document.write("Entering switch block<br />");
switch (grade)
{
case 'A': document.write("Good job<br />");
break;
case 'B': document.write("Pretty good<br />");
break;
case 'C': document.write("Passed<br />");
break;
default: document.write("Unknown grade<br />")
}document.write("Exiting switch block");
</script>
22. 1.7 While-Loop:-
• While writing a program, you may encounter a situation where you need to
perform an action over and over again. In such situations, you would need to write
loop statements to reduce the number of lines.
• The purpose of a while loop is to execute a statement or code block repeatedly as
long as an expression is true.
25. 1.8 Do-While-Loop:-
• The do...while loop is similar to the while loop except that the condition check
happens at the end of the loop.This means that the loop will always be executed
at least once, even if the condition is false.
28. Task No :- 05
• Perform task for
• Switch-case
• While loop
• Do while
29. 1.9 For Loop:-
The ‘for’ loop is the most compact form of looping. It includes the following three
important parts:
1.The loop initialization where we initialize our counter to a starting value.The
initialization statement is executed before the loop begins.
2.The test statement which will test if a given condition is true or not. If the
condition is true, then the code given inside the loop will be executed, otherwise the
control will come out of the loop.
3.The iteration statement where you can increase or decrease your counter.
32. Task no:-06
• Perform task for for-loop.
• Use for and while loop in a single format.
• Use for and if loop in a single format.
33. 1.10 Factorial Of a Number:-
Factorial of number is the product of all positive descending integers. Factorial of n
is denoted by n!. For example -
4! = 4 * 3 * 2 * 1 = 24
5! = 5 * 4 * 3 * 2 * 1 = 120
Formulas:-
factorial(n)=n∗(n−1)∗...∗1
factorial(n)=n∗factorial(n−1)
34. 1.10.1 Factorial Approach:-
There are two ways to compute the factorial of a number in JavaScript.
• Iterative
• Recursive
1.The iterative approach
Keeping in mind the first definition of a factorial, the variable i is initially set equal to n and
is gradually decremented to 1. In each step, the result of the multiplication is stored in the
variable answer.
35. Assignment no:-12
• Iterative-Approach in Factorial :-
function factorial(n){
let answer = 1;
if (n == 0 || n == 1){
return answer;
}else{
for(var i = n; i >= 1; i--){
answer = answer * i;
} return answer;
}
}
let n = 4;
answer = factorial(n)
console.log("The factorial of " + n + " is " + answer);
</script>
36. 1.10.2The recursive approach:-
• As stated above, the factorial of n can be found by finding the factorial of a
number one less than n, and then multiplying this answer with n. So the factorial
of n-1 can be thought of as a subproblem that needs to be computed first.
function call return value
factorial(1) 1 (base case)
factorial(2) 2 * 1 = 2
factorial(3) 3 * 2 = 6
factorial(4) 4 * 6 = 24
37. Assignment no:-13
• Factorial recursive approach:-
function factorial(n)
if(n == 0 || n == 1){
return 1;
//recursive case
}else{
return n * factorial(n-1);
}
}
let n = 4;
answer = factorial(n)
console.log("The factorial of " + n + " is " + answer);
38. 2.0 Fibonacci Series:-
The sequence of Fibonacci numbers has the formula Fn = Fn-1 + Fn-2. In other
words, the next number is a sum of the two preceding ones.
First two numbers are 1, then 2(1+1), then 3(1+2),
5(2+3) and so on: 1, 1, 2, 3, 5, 8, 13, 21……….n
39. Assignment no:-14
• Recursion in Fibonacci series:-
function fibonacci(n) {
if (n === 1 || n === 0) {
return 1;
} else {
return fibonacci(n - 1) + fibonacci(n - 2);
}
}
console.log(fibonacci(10));
40. Assignment no:-15
• Fibonacci series:-
<script>
function fibonancci(n)
{
const arr = [1]
let current = 1;
let previous = 0;
if(n <= 1)
{
return arr
}
while(n>0)
{
current += previous
previous = current - previous
arr.push(current)
n-=1
}
return arr
}
console.log(fibonancci(10));
</script>
41. Task No:-07
• Print Factorial and Fibonacci series.
• Print Odd and even number
• Print Interment and decrement of a number
• Print A star pyramid.
• Print color in switch case condition.