Profile Lookup FCC JS challenge
How do I make an profile lookup fcc js challenge?
What is a profile lookup fcc js challenge? How do you make a profile lookup fcc js challenge? This script and codes were developed by Brooke Shepherd on 22 October 2022, Saturday.
Profile Lookup FCC JS challenge - Script Codes HTML Codes
<!DOCTYPE html>
<html >
<head> <meta charset="UTF-8"> <title>Profile Lookup FCC JS challenge</title>
</head>
<body> <script src="js/index.js"></script>
</body>
</html>
Profile Lookup FCC JS challenge - Script Codes JS Codes
//Setup
var contacts = [{ "firstName": "Akira", "lastName": "Laine", "number": "0543236543", "likes": ["Pizza", "Coding", "Brownie Points"]
}, { "firstName": "Harry", "lastName": "Potter", "number": "0994372684", "likes": ["Hogwarts", "Magic", "Hagrid"]
}, { "firstName": "Sherlock", "lastName": "Holmes", "number": "0487345643", "likes": ["Intriguing Cases", "Violin"]
}, { "firstName": "Kristian", "lastName": "Vos", "number": "unknown", "likes": ["Javascript", "Gaming", "Foxes"]
}];
function lookUpProfile(firstName, prop) { // Only change code below this line for (var i = 0; i < contacts.length; i++) { if (firstName == contacts[i].firstName) { if (contacts[i].hasOwnProperty(prop)) { return contacts[i][prop]; } else { return "No such property"; } } } return "No such contact"; // Only change code above this line
}
// Change these values to test your function
lookUpProfile("Akira", "likes");
Developer | Brooke Shepherd |
Username | tinyinkling |
Uploaded | October 22, 2022 |
Rating | 3 |
Size | 1,772 Kb |
Views | 26,312 |
Find the perfect freelance services for your business! Fiverr's mission is to change how the world works together. Fiverr connects businesses with freelancers offering digital services in 500+ categories. Find Developer!
Name | Size |
CABieberGame | 1,779 Kb |
WCC2 | 1,347 Kb |
Factorialize FCC | 3,425 Kb |
Card Count JS FCC | 1,541 Kb |
Testing Obj for Properties JS FCC | 1,505 Kb |
Time Calculator secsAlive | 1,543 Kb |
TH MadLib in JS | 1,536 Kb |
Random Number Generator 20D | 1,382 Kb |
Random Number Generator TH | 1,602 Kb |
Random Number III TH | 1,728 Kb |
Jasper is the AI Content Generator that helps you and your team break through creative blocks to create amazing, original content 10X faster. Discover all the ways the Jasper AI Content Platform can help streamline your creative workflows. Start For Free!
Name | Username | Size |
Comment Jquery | SquishyAndroid | 2,421 Kb |
Simple Flat Menu | Jeplaa | 2,467 Kb |
Rrremark.com Overlay Highlighter | Derickruiz | 4,438 Kb |
Google Maps API Ground Overlay | Boycetrus | 2,961 Kb |
Flex layout example | Mofny | 1,663 Kb |
FCC - Tribute Page | Cmwebby | 0 Kb |
Bootstrap Carousel Fade Transition | Rowno | 2,484 Kb |
A Pen by Gregory Potdevin | GregoryPotdevin | 1,713 Kb |
LDE old privacy page | Jasonangle | 2,339 Kb |
Mega menu | DimaZubkov | 5,066 Kb |
Surf anonymously, prevent hackers from acquiring your IP address, send anonymous email, and encrypt your Internet connection. High speed, ultra secure, and easy to use. Instant setup. Hide Your IP Now!