This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x4f38f4229924bfa28d58eeda496cc85e8016bccc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
0x4f38f4229924bfa28d58eeda496cc85e8016bccc |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const palindrome = (text) => { | |
const regex = /[\W_]/g; | |
const textWithOutUnWantedXters = text.toLowerCase().replace(regex, ''); | |
const reversedText = textWithOutUnWantedXters.split('').reverse().join(''); | |
return reversedText === textWithOutUnWantedXters; | |
} | |
const answer = palindrome('civic'); | |
console.log('IS PALINDROME ', answer); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" | |
content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Mini App</title> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" | |
content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Mini App</title> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<!DOCTYPE html> | |
<html lang="en"> | |
<head> | |
<meta charset="UTF-8" /> | |
<meta name="viewport" | |
content="width=device-width, initial-scale=1.0" /> | |
<meta http-equiv="X-UA-Compatible" content="ie=edge" /> | |
<title>Mini App</title> | |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
'use strict'; | |
const data = [ | |
{name: 'Adam', age: 30, gender: 'Male'}, | |
{name: 'Nancy', age: 40, gender: 'Female'}, | |
{name: 'Fred', age: 35, gender: 'Male'}, | |
{name: 'Nina', age: 21, gender: 'Female'}, | |
{name: 'Chloe', age: 37, gender: 'Female'}, | |
{name: 'Neo', age: 32, gender: 'Male'}, | |
{name: 'Max', age: 39, gender: 'Male'}, |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
INSERT INTO marvel_universe (group_name, members) | |
VALUES( | |
'avengers', | |
JSON_ARRAY( | |
JSON_OBJECT("name","tony stark", "capabilities", JSON_ARRAY("body armour","laser","levitation")), | |
JSON_OBJECT("name", "hulk", "capabilities", JSON_ARRAY("expand","smash")) | |
) | |
), | |
( |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$router->get('/users/{user}', function ($resolvedUser) { | |
$user = $resolvedUser->load('posts'); | |
dd($user); | |
}); |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$router->get('/users/{user}', function ($resolvedUser) { | |
dd($resolvedUser); | |
}); |
NewerOlder