Learn Modern JavaScript: Getting Started

Learn Modern JavaScript: Getting Started

Learn Modern JavaScript: Getting Started

Description
JavaScript has changed and matured since its humble beginnings in 1995. One of the original goals of JavaScript in those early years was to make it easy for beginners. That goal has made it accessible for all types of people. However, this has also meant that JavaScript has been taught and learned incompletely by many.

In Learn Modern JavaScript: Getting Started, you are taught the fundamentals of JavaScript the right way. We won't skip topics. Some topics may seem more advanced, but that is because they are crucial to a complete grounding of JavaScript. Most importantly, you are taught the why, not just the what and how.

This course contains 12 sections, 113 different topics, over 13 hours of video tutorials, 12 exercises and everything you need for the proper grounding in JavaScript.

If you are ready to jump into the world of JavaScript or you want to increase you new found skills, this course is for you!

Basic knowledge
Prior to taking this course, it is best, but not required, to have some familiarity to HTML and CSS. As for tools, you will need a browser and a text editor. You should have some familiarity of using a browser
What will you learn
At the conclusion of this course you will be able to:

Understand the strengths and weaknesses of JavaScript
Write JavaScript code and link it to a web page
Test JavaScript code using the browser console
Declare variables and manipulate values
Work with operators
Explain coercion and hoisting
Use the Date and Math object
Use template strings for displaying output
Incorporate if conditionals in your code
Use a switch statement when appropriate
Understand and apply the while and for loop
Create an array
Add and remove elements from an array
Use array methods
Create user defined functions
Create arrow functions
Explain scope
Create user defined objects
Explain prototypal inheritance
Use the constructor and class structure to create objects
Explain the DOM
Select and modify elements from the DOM
Create event handles to respond to user actions
Debug your code
Optimally deploy your JavaScript code

JavaScript Tutorial: if-else Statement in JavaScript

JavaScript Tutorial: if-else Statement in JavaScript

This JavaScript tutorial is a step by step guide on JavaScript If Else Statements. Learn how to use If Else in javascript and also JavaScript If Else Statements. if-else Statement in JavaScript. JavaScript's conditional statements: if; if-else; nested-if; if-else-if. These statements allow you to control the flow of your program's execution based upon conditions known only during run time.

Decision Making in programming is similar to decision making in real life. In programming also we face some situations where we want a certain block of code to be executed when some condition is fulfilled.
A programming language uses control statements to control the flow of execution of the program based on certain conditions. These are used to cause the flow of execution to advance and branch based on changes to the state of a program.

JavaScript’s conditional statements:

  • if
  • if-else
  • nested-if
  • if-else-if

These statements allow you to control the flow of your program’s execution based upon conditions known only during run time.

  • if: if statement is the most simple decision making statement. It is used to decide whether a certain statement or block of statements will be executed or not i.e if a certain condition is true then a block of statement is executed otherwise not.
    Syntax:
if(condition) 
{
   // Statements to execute if
   // condition is true
}

Here, condition after evaluation will be either true or false. if statement accepts boolean values – if the value is true then it will execute the block of statements under it.
If we do not provide the curly braces ‘{‘ and ‘}’ after if( condition ) then by default if statement will consider the immediate one statement to be inside its block. For example,

if(condition)
   statement1;
   statement2;

// Here if the condition is true, if block 
// will consider only statement1 to be inside 
// its block.

Flow chart:

Example:

<script type = "text/javaScript"> 

// JavaScript program to illustrate If statement 

var i = 10; 

if (i > 15) 
document.write("10 is less than 15"); 

// This statement will be executed 
// as if considers one statement by default 
document.write("I am Not in if"); 

< /script> 

Output:

I am Not in if
  • if-else: The if statement alone tells us that if a condition is true it will execute a block of statements and if the condition is false it won’t. But what if we want to do something else if the condition is false. Here comes the else statement. We can use the else statement with if statement to execute a block of code when the condition is false.
    Syntax:
if (condition)
{
    // Executes this block if
    // condition is true
}
else
{
    // Executes this block if
    // condition is false
}


Example:

<script type = "text/javaScript"> 

// JavaScript program to illustrate If-else statement 

var i = 10; 

if (i < 15) 
document.write("10 is less than 15"); 
else
document.write("I am Not in if"); 

< /script> 

Output:

i is smaller than 15
  • nested-if A nested if is an if statement that is the target of another if or else. Nested if statements means an if statement inside an if statement. Yes, JavaScript allows us to nest if statements within if statements. i.e, we can place an if statement inside another if statement.
    Syntax:
if (condition1) 
{
   // Executes when condition1 is true
   if (condition2) 
   {
      // Executes when condition2 is true
   }
}

Example:

<script type = "text/javaScript"> 

// JavaScript program to illustrate nested-if statement 

var i = 10; 

if (i == 10) { 

// First if statement 
if (i < 15) 
	document.write("i is smaller than 15"); 

// Nested - if statement 
// Will only be executed if statement above 
// it is true 
if (i < 12) 
	document.write("i is smaller than 12 too"); 
else
	document.write("i is greater than 15"); 
} 
< /script> 

Output:

i is smaller than 15
i is smaller than 12 too
  • if-else-if ladder Here, a user can decide among multiple options.The if statements are executed from the top down. As soon as one of the conditions controlling the if is true, the statement associated with that if is executed, and the rest of the ladder is bypassed. If none of the conditions is true, then the final else statement will be executed.
if (condition)
    statement;
else if (condition)
    statement;
.
.
else
    statement;


Example:

<script type = "text/javaScript"> 
// JavaScript program to illustrate nested-if statement 

var i = 20; 

if (i == 10) 
document.wrte("i is 10"); 
else if (i == 15) 
document.wrte("i is 15"); 
else if (i == 20) 
document.wrte("i is 20"); 
else
document.wrte("i is not present"); 
< /script> 

Output:

i is 20

How to Retrieve full Profile of LinkedIn User using Javascript

How to Retrieve full Profile of LinkedIn User using Javascript

I am trying to retrieve the full profile (especially job history and educational qualifications) of a linkedin user via the Javascript (Fetch LinkedIn Data Using JavaScript)

Here we are fetching LinkedIn data like Username, Email and other fields using JavaScript SDK.

Here we have 2 workarounds.

  1. Configuration of linkedIn developer api
  2. Javascript Code to fetch records

Configuration of linkedIn developer api

In order to fetch records, first we need to create developer api in linkedin which will act as token/identity while fetching data from other linkedin accounts.

So to create api, navigate to https://linkedin.com/developer/apps and click on 'Create Application'.

After navigating, fill in details like name, description and other required fields and then submit.

As we submit, it will create Client ID and Client Secret shown below, which we will be using in our code while communicating to fetch records from other LinkedIn account.

Note: We need to provide localhost Url here under Oauth 2.0. I am using my localhost, but you can probably use other production URLs under Oauth 2.0 where your app is configured. It will make your api  consider the Url as trusted which fetching records.

Javascript Code to fetch records

For getting user details like first name, last name,User image can be written as,

<script type="text/javascript" src="https://platform.linkedin.com/in.js">  
    api_key: XXXXXXX //Client ID  
    onLoad: OnLinkedInFrameworkLoad //Method that will be called on page load  
    authorize: true  
</script>  
<script type="text/javascript">  
    function OnLinkedInFrameworkLoad() {  
        IN.Event.on(IN, "auth", OnLinkedInAuth);  
    }  
  
    function OnLinkedInAuth() {  
        IN.API.Profile("me").result(ShowProfileData);  
    }  
  
    function ShowProfileData(profiles) {  
        var member = profiles.values[0];  
        var id = member.id;  
        var firstName = member.firstName;  
        var lastName = member.lastName;  
        var photo = member.pictureUrl;  
        var headline = member.headline;  
        //use information captured above  
        var stringToBind = "<p>First Name: " + firstName + " <p/><p> Last Name: " + lastName + "<p/><p>User ID: " + id + " and Head Line Provided: " + headline + "<p/>"  
        document.getElementById('profiles').innerHTML = stringToBind;  
    }  
</script>    

Kindly note we need to include 'https://platform.linkedin.com/in.js' as src under script type as it will act on this Javascript SDK provided by Linkedin.

In the same way we can also fetch records of any organization with the companyid as keyword.

<head>  
    <script type="text/javascript" src="https://platform.linkedin.com/in.js">  
        api_key: XXXXXXX ////Client ID  
        onLoad: onLinkedInLoad  
        authorize: true  
    </script>  
</head>  
  
<body>  
    <div id="displayUpdates"></div>  
    <script type="text/javascript">  
        function onLinkedInLoad() {  
            IN.Event.on(IN, "auth", onLinkedInAuth);  
            console.log("On auth");  
        }  
  
        function onLinkedInAuth() {  
            var cpnyID = XXXXX; //the Company ID for which we want updates  
            IN.API.Raw("/companies/" + cpnyID + "/updates?event-type=status-update&start=0&count=10&format=json").result(displayCompanyUpdates);  
            console.log("After auth");  
        }  
  
        function displayCompanyUpdates(result) {  
            var div = document.getElementById("displayUpdates");  
            var el = "<ul>";  
            var resValues = result.values;  
            for (var i in resValues) {  
                var share = resValues[i].updateContent.companyStatusUpdate.share;  
                var isContent = share.content;  
                var isTitled = isContent,  
                    isLinked = isContent,  
                    isDescription = isContent,  
                    isThumbnail = isContent,  
                    isComment = isContent;  
                if (isTitled) {  
                    var title = isContent.title;  
                } else {  
                    var title = "News headline";  
                }  
                var comment = share.comment;  
                if (isLinked) {  
                    var link = isContent.shortenedUrl;  
                } else {  
                    var link = "#";  
                }  
                if (isDescription) {  
                    var description = isContent.description;  
                } else {  
                    var description = "No description";  
                }  
                /* 
                if (isThumbnailz) { 
                var thumbnailUrl = isContent.thumbnailUrl; 
                } else { 
                var thumbnailUrl = "http://placehold.it/60x60"; 
                } 
                */  
                if (share) {  
                    var content = "<a target='_blank' href=" + link + ">" + comment + "</a><br>";  
                    //el += "<li><img src='" + thumbnailUrl + "' alt=''>" + content + "</li>";  
                    el += "<li><div>" + content + "</div></li>";  
                }  
                console.log(share);  
            }  
            el += "</ul>";  
            document.getElementById("displayUpdates").innerHTML = el;  
        }  
    </script>  
</body>  

We can get multiple metadata while fetching records for any any organization. We can get company updates as shown below.

Conclusion

We can also fetch any company specific data like company job updates/post, total likes, comments, and number of views along with a lot of metadata we can fetch which I have shown below.

Thank you for reading !

Learn How To Become an Online Teacher | Teach Online 24/7/365

Learn How To Become an Online Teacher | Teach Online 24/7/365

Is online education growing? No. It is exploding. Take up this opportunity to become a globally successful online teacher. It requires self-discipline, managing an online class, and preparing the student before the start of the lesson. Make this learning yours, at just $9!

Description
Introduction

A survey conducted by the Babson Survey Research Group regarding online learning showed that the number of students enrolled in one or more online courses was nearly 7 million in 2011. This was more than a half million increase over 2010. At the college level, 32 percent of students are taking at least one online course.

As online education literally explodes, the issue facing the education system is that teaching online is not the same as teaching face to face. If you’re a teacher, be it home school, public school, Bible study teacher, or someone who teaches a special skill or subject, you know this.

The question for many people wishing to transition to teaching in a virtual classroom is a very simple one: How do I do an effective job of teaching online?

That’s the question this course is designed to answer. In this course, University of Phoenix Advanced Certified Online Instructor David Lantz walks you through the teaching strategies being used by the best online college instructors to teach in an asynchronous online course.

Lesson Materials

A total of 17 video lessons divided between 3 course modules constitute the core of the learning materials. These videos are recorded power point presentations converted to video designed to emphasize key learning objectives. Additionally, each module is accompanied by an ebook (PDF) designed to round out the video presentations. Each module is introduced and concluded by a video of the course creator, David Lantz.

A fourth module, Next Steps, concludes the course, and offers several other resources the student may wish to take advantage of.

Depending on the pace of the online learner, one should plan to spend about four hours going through the materials.

Course Organization

The course is divided into three modules. The first module, Creating a Culture of Self- Discipline Online, is designed to help you learn how to motivate your students to develop the self-discipline required to learn in the online environment. This module is, in turn subdivided into three parts.

Learning Modality and Student Motivation
Establishing Participation Expectations
Building an Online Community
The second module, Managing the Online Classroom, recognizes that online facilitation involves three basic areas of focus: organizational, social, and intellectual. The instructor, therefore, should see his or her role as being that as a facilitator of online learning, rather than simply the “Sage on the Stage.” This module is also subdivided into three parts.

Socratic Teaching: How to Teach by Asking Questions
It’s ALL About What you Say and How You Say It
Online Interaction: Best Practices
The third module, Preparing to Teach in the Flipped Classroom, examines the trend of having the student access the “lecture” via video/online instruction created by the instructor or another educator before coming to a face to face class. The role of the classroom teacher changes from Lecturer to Mentor. Rather than spending time teaching in class, the instructor uses learning-based activities. Doing this effectively requires the teacher to put a lot of effort into his/her course preparation up front. This module delivers the following three sessions:

Enabling Your Students to Learn 24/7/365
Creating Your On Demand Unidirectional Materials
Exploring an Asynchronous Learning Management Classroom
Why Take This Course

The explosion in online learning requires educators who know how to teach online. Key research findings about student learning in the online classroom underscore the importance of having instructors who can manage the online classroom to insure that students learn. Online facilitation involves three basic areas of focus: organizational, social, and intellectual. How to Teach in the Online Classroom 24/7/365 covers all three of these aspects of online instruction to prepare you to teach online.

About David Lantz

Hello, my name is David Lantz. I’ve been teaching online at the college level since 2004. I was voted Faculty of the Year by the first graduating class of the Indianapolis Campus of the University of Phoenix. In May of 2012, I was awarded that school’s Advanced Facilitator Certification. In addition to teaching online for University of Phoenix, I teach for 3 other schools on such subjects as statistics, economics, E-commerce, and public relations. Five years ago, I set about the process of showing others how to teach online. I worked with my first pilot group of 8 students over a four week period to demonstrate best practice techniques for online, asynchronous teaching. With Simpliv's powerful online course delivery system, I now have a way to take what we did in that prototype class and demonstrate the art of online instruction via video and downloadable text instruction.

Welcome to my course!

Who is the target audience?

Are you a teacher - be it home school, public school, Bible study teacher, or someone who teaches a special skill or subject who wants to learn how to teach online? This course is for you
Basic knowledge
Have internet access and the ability to play streaming audio and video. Additionally, download and print or store PDF files

What will you learn

My goal for you in taking this course is two-fold: Recognize what it takes to do an effective job of teaching online, and prepare yourself to enter a field where demand is expanding rapidly
To fulfill these goals, you will learn about the following three components of effective online instruction: Creating a culture of self-discipline so that your students are motivated to learn; Managing the online classroom to maximize student engagement and learning; Preparing to teach in the evolving online, "flipped," classroom

Click Here to continue