Query selector is null when trying to use a value from an HTML file on another

I am doing an interactive rating page like this one but when I’m trying to print the rate selected in the second file it is not printing and displaying an error:

Uncaught TypeError: rates is null

Here’s my index.html file code:

    <div class="rating-container">
            <div class="rating">1</div>
            <div class="rating">2</div>
            <div class="rating">3</div>
            <div class="rating">4</div>
            <div class="rating">5</div>
          </div>
    
          <div class="button-container">
            <button class="submit-btn" onClick="checked()">
              SUBMIT
            </button>
          </div>
        </div>
    
        <script src="app.js"></script>
      </body>

My checked.html code:

<div id="rating-selected">
      <p>you selected <span class="rated"></span> out of 5</p>
    </div>

    <div class="text-container">
      <div class="title-container">
        

My app.js code:

let ratings=document.getElementsByClassName('rating');
const quali=document.getElementsByClassName('rated');
const rates=document.querySelector('.rating-container'); //Div que tiene los ratings
const rating=document.getElementsByClassName('rating');
let rate=0;

for (var i=0; i<rating.length; i++){
  rating[i].addEventListener("click", function(event){
  this.classList.toggle("active");
  });
}

  rates.addEventListener("click", function(event){
    
    rate=event.target.innerHTML;
        //console.log(rate);
  });


function checked(){
  window.location.href="checked.html";
  quali.textContent=rate;
  console.log(rate);
}

Need to translate my blog into three different google translate languages and then back to original language

I have two separate but similar blogs that I’ve built up. I only want to write posts for one and then google translate my post into french, german and spanish and back to english.
It works well but I’d like it automated. Can anyone give me a script to do that please.
Translate my english blog post to:
french, then to german then to spanish then back to english.
Thanks,
Kim

Concentric circles slightly off center?

I have a program that takes user input and makes concentric circles. In some instances, I can tell that the circles are ever so slightly off-center. It happens with very small circles usually. In larger circles, it is barely noticeable and hard to tell but I can only tell when creating very small circles with a small inner circle as well too. Can anyone fix this?

jQuery(document).ready(function($) {
  $(function() {
    $('.div2').hide();
    $(document).on("touchmove mousemove", function() {
      var $outer_diameter = parseFloat($("#outer_diameter").val()).toFixed(3);
      var $converted = ($outer_diameter * 3.75).toFixed(3);
      if ($outer_diameter > 100) {
        $("#error").text($outer_diameter + " is too big").show();
        return false;
      }
      if ($outer_diameter < 0) {
        $('#error').text('Please input a positive integers').show();
        return false;
      }
      // console.log($outer_diameter, $converted);
      $('.div2').css({
        height: (2 * $converted),
        width: (2 * $converted),
        top: "calc(50% - " + ($converted) + "px)",
        left: "calc(50% - " + ($converted) + "px)"
      });
      $('.div2').fadeIn(300);

      $('#error').hide();
    })

    $('.div3').hide();
    $(document).on("touchmove mousemove", function() {
      var $outer_diameter = parseFloat($("#outer_diameter").val()).toFixed(3);
      var $inner_diameter = parseFloat($("#inner_diameter").val()).toFixed(3);
      var $converted_2 = (($outer_diameter * 3.75) - (2 * ($inner_diameter * 3.75))).toFixed(3);

      if ($outer_diameter > 100) {
        $("#error").text($outer_diameter + " is too big").show();
        return false;
      }
      if ($inner_diameter < 0) {
        $('#error').text('Please input a positive integers').show();
        return false;
      }
      if ($inner_diameter >= 0.33 * $outer_diameter) {
        $('#error').text('Wall Thickness is invalid').show();
        $('.div3').hide();
        return false;
      }
      //console.log($inner_diameter, $converted_2);
      $('.div3').css({
        height: (2 * $converted_2),
        width: (2 * $converted_2),
        top: "calc(50% - " + ($converted_2) + "px)",
        left: "calc(50% - " + ($converted_2) + "px)"
      });
      $('.div3').fadeIn(300);
      $('#error').hide();
    })
    $('.div1').hide();
    $(document).on('change', '#cutter', function() {
      var $cutter = parseFloat($("#cutter").val()).toFixed(3);
      var $converted3 = ($cutter * 3.75).toFixed(3);
      var $outer_diameter = parseFloat($("#outer_diameter").val()).toFixed(3);
      var $inner_diameter = parseFloat($("#inner_diameter").val()).toFixed(3);
      var $converted_2 = (($outer_diameter * 3.75) - (2 * ($inner_diameter * 3.75))).toFixed(3);
      if ($cutter > $outer_diameter) {
        $('#error2').text('Cutter cannot be larger than Pipe O.D.').show();
        return false;
      }
      if ($cutter < 0) {
        $('#error').text('Please input a positive integers').show();
        return false;
      }

      if ($cutter > 72) {
        $('#error').text('Cutter is too big.').show();
        return false;
      }
      $('.div1').css({
        width: (2 * $converted3)
      })
      $('.div1').fadeIn(300);
      $('#error').hide();
      $('#error2').hide();
    })
  });
});
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  height: 500px;
  border: 1px solid gray;
}

.elem {
  box-sizing: border-box;
}

.div1 {
  border-top: 3px solid #0DA8AA;
  border-left: 1px solid #0DA8AA;
  border-right: 1px solid #0DA8AA;
  height: 70px;
  background: white;
}

.div2 {
  border: 1px solid blue;
  border-radius: 50%;
  width: 0px;
  height: 0px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.div3 {
  border: 1px solid green;
  border-radius: 50%;
  width: 0px;
  height: 0px;
  background: white;
}
<script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.3.1/jquery.min.js"></script>
<div class="container">
  <p id="error">
  </p>
  <p id="error2">
  </p>
  <div class="elem div1"></div>
  <div class="elem div2">
    <div class="elem div3">
    </div>
  </div>
</div>
<div class="Calculations">
  <input type="number" id="cutter" placeholder="Enter Cutter O.D."> <br>
  <input type="number" id="outer_diameter" placeholder="Enter Outer Diameter"> <br>
  <input type="number" id="inner_diameter" placeholder="Enter Thickness"> <br>
  <input type="button" id="bttn" name="calculate" value="Calculate">
</div>

jsFiddle: https://jsfiddle.net/Kaevonz/wry3n0m7/232/

enter image description here

jQuery(document).ready(function($) {
  $(function() {
    $('.div2').hide();
    $(document).on("touchmove mousemove", function() {
      var $outer_diameter = parseFloat($("#outer_diameter").val()).toFixed(3);
      var $converted = ($outer_diameter * 3.75).toFixed(3);

      if ($outer_diameter > 100) {
        $("#error").text($outer_diameter + " is too big").show();
        return false;
      }

      if ($outer_diameter < 0) {
        $('#error').text('Please input a positive integers').show();
        return false;
      }

      console.log($outer_diameter, $converted);
      $('.div2').css({
        height: (2 * $converted),
        width: (2 * $converted),
        top: "calc(50% - " + ($converted) + "px)",
        left: "calc(50% - " + ($converted) + "px)"
      });
      $('.div2').fadeIn(300);

      $('#error').hide();
    })




    $('.div3').hide();
    $(document).on("touchmove mousemove", function() {
      var $outer_diameter = parseFloat($("#outer_diameter").val()).toFixed(3);
      var $inner_diameter = parseFloat($("#inner_diameter").val()).toFixed(3);
      var $converted_2 = (($outer_diameter * 3.75) - (2 * ($inner_diameter * 3.75))).toFixed(3);

      if ($outer_diameter > 100) {
        $("#error").text($outer_diameter + " is too big").show();
        return false;
      }

      if ($inner_diameter < 0) {
        $('#error').text('Please input a positive integers').show();
        return false;
      }

      if ($inner_diameter >= 0.33 * $outer_diameter) {
        $('#error').text('Wall Thickness is invalid').show();
        $('.div3').hide();
        return false;
      }


      console.log($inner_diameter, $converted_2);
      $('.div3').css({
        height: (2 * $converted_2),
        width: (2 * $converted_2),
        top: "calc(50% - " + ($converted_2) + "px)",
        left: "calc(50% - " + ($converted_2) + "px)"
      });
      $('.div3').fadeIn(300);
      $('#error').hide();
    })


    $('.div1').hide();
    $(document).on('change', '#cutter', function() {
      var $cutter = parseFloat($("#cutter").val()).toFixed(3);
      var $converted3 = ($cutter * 3.75).toFixed(3);
      var $outer_diameter = parseFloat($("#outer_diameter").val()).toFixed(3);
      var $inner_diameter = parseFloat($("#inner_diameter").val()).toFixed(3);
      var $converted_2 = (($outer_diameter * 3.75) - (2 * ($inner_diameter * 3.75))).toFixed(3);

      if ($cutter > $outer_diameter) {
        $('#error2').text('Cutter cannot be larger than Pipe O.D.').show();
        return false;
      }

      if ($cutter < 0) {
        $('#error').text('Please input a positive integers').show();
        return false;
      }

      if ($cutter > 72) {
        $('#error').text('Cutter is too big.').show();
        return false;
      }




      $('.div1').css({
        width: (2 * $converted3)

      })
      $('.div1').fadeIn(300);
      $('#error').hide();
      $('#error2').hide();
    })

  });
});

<div class="container">
  <p id="error">

  </p>
  <p id="error2">

  </p>
  <div class="elem div1"></div>
  <div class="elem div2">
    <div class="elem div3">
    </div>
  </div>

</div>

<div class="Calculations">
  <input type="number" id="cutter" placeholder="Enter Cutter O.D."> <br>
  <input type="number" id="outer_diameter" placeholder="Enter Outer Diameter"> <br>
  <input type="number" id="inner_diameter" placeholder="Enter Thickness"> <br>
  <input type="button" id="bttn" name="calculate" value="Calculate">
</div>
.container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: start;
  height: 500px;
  border: 1px solid gray;
}

.elem {
  box-sizing: border-box;
}

.div1 {
  border-top: 3px solid #0DA8AA;
  border-left: 1px solid #0DA8AA;
  border-right: 1px solid #0DA8AA;
  height: 70px;
  background: white;
}

.div2 {
  border: 1px solid blue;
  border-radius: 50%;
  width: 0px;
  height: 0px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
}

.div3 {
  border: 1px solid green;
  border-radius: 50%;
  width: 0px;
  height: 0px;
  background: white;
}

Angular service returning undefined to component

I want to pass the return value to my component. I wrote this service using firebase. When calling the geLoggedInUser method in my component it returns undefined. Ideally, I want to pass the doc.id to my component from my service please help;

SERVICE

docId: any;

    
getLoggedInUser() {
    this.fireAuth.onAuthStateChanged((user) => {
      if (user) {
        console.log(user.email, 'user is valid');

        const db = collection(this.firestore, 'users');
        getDocs(db).then((resp) => {
          this.data = [
            ...resp.docs.map((item) => {
              return { ...item.data(), id: item.id };
            }),
          ];

          //filter users array to get current logged in users data
          this.authUser = this.data.filter((item: any) => {
            this.docId = user.uid;
            return item.email === user.email;
          });
        });
      } else {
        this.router.navigate(['/login']);
        return;
      }
    });
    return this.docId;
  }

COMPONENT

  ngOnInit(): void {
    console.log(this.auth.getLoggedInUser());
  }

Why does a SVG line disappear when I apply a SVG linearGradient?

Update: Gets weirder. If the line is horizontal it disappears, but if it has any slope at all, it shows up just fine. Look at id=”horizontalNoShow” if you change it so y1 and y2 are not equal, it will render.

I think this is a bug but not sure. Happens in Chrome and Safari. Trying to add an SVG linearGradient to a line.

I can add it to all other shapes, but when I add it to the line, the line disappears. Still shows up in the DOM, but just not getting rendered for some reason?

I have a purple line that shows up great. I have a rectangle with a gradient stroke that shows up great. But when I combine the gradient stroke with the line, it doesn’t show up.

<svg width="" height="">
  <defs>
    <linearGradient id="FirstGradient" >
      <stop offset="0%" style="stop-color:#FF00FF"/>
      <stop offset="100%" style="stop-color:#FFFF00"/>
    </linearGradient>
  </defs>
  <line id="someSlopeShow" x1="50" y1="70" x2="250" y2="71"
    stroke="url('#FirstGradient')"
    stroke-width="6"
  />
  <line id="horizontalNoShow" x1="55" y1="90" x2="255" y2="90"
    stroke="url('#FirstGradient')"
    stroke-width="6"
  />
  <rect id="exampleTwoRectSVG"
    x="10" y="10"
    width="200" height="100"
    stroke="url(#FirstGradient)"
    stroke-width="15"
    fill='transparent'
    stroke-dasharray="110 20"
  />
</svg>

How can I prevent my program from converting selected number which starts with 0 to octal value using javascript?

When I select a number that starts with 0, such a number is converted to its octal form which I don’t want but works perfectly well for those that didn’t start with 0. Attached is pictures explaining what I mean.

Before Selection of Number starting with 0

enter image description here

After Selection of Number starting with 0

enter image description here

From the picture you can see 0703 got converted to 451. How can I stop this.

This is my HTML code

<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <link rel="stylesheet" href="file.css">
    <title>Document</title>
</head>
<body class="form-body">
    <section class="section1"></section>
    <section class="section2">
        <div class="reg-form">
            <form action="" method="">
                <div class="form-container">
                    <h1 style="text-align: center;">Phonie</h1>
    
                    <div class="input-reg email-input">
                        <label for="username">Username</label>
                        <input id="username"  type="text" name="username" >
                    </div>
                    <div class="list-div">
                        <ul class="list"></ul>
                    </div>
                    
                    <div class="input-reg email-input">
                        <label for="phone">Phone Number</label>
                        <input id="phone"  type="text" name="phone"  >
                    </div>
                    
                    <div class="input-reg email-input">
                        <input class="submit-btn submit-btn2" type="submit" value="Check Number">
                    </div>
                </div>
            </form>
        </div>
    </section>

    <script src="script.js"></script>
</body>
</html> 

This is my Javascript code

let phoneNumberSelector = document.querySelector("#phone");
const mtnNumber = ['703', '706', '803', '806', '810', '813', '814', '816', '903', '906', '913', '0703', '0706'];

phoneNumberSelector .addEventListener('keyup', (e)=>{
    removeElements();
    for (let i of mtnNumber) {
        // i = i.toString();
        if (i.startsWith(phoneNumberSelector.value) && phoneNumberSelector.value != '') {
            let listItem = document.createElement("li");
            listItem.classList.add('list-items');
            listItem.style.cursor = 'pointer';
            listItem.setAttribute('onclick', "displayNames("+i+")")
            let word = "<b>"+ i.slice(0, phoneNumberSelector.value.length) + "</b>";
            word += i.slice(phoneNumberSelector.value.length);
            listItem.innerHTML = word;
            document.querySelector('.list').appendChild(listItem);
        }
        
    }
    
})
function displayNames(param) {
    phoneNumberSelector.value = param;
    removeElements();
}

function removeElements() {
    let items = document.querySelectorAll('.list-items')
    items.forEach((element) => {
        element.remove();
    });
}

How do I run an old app that needs specific node modules without using nvm for windows?

I was given a copy of a node modules from the older app that I am trying to run on windows. I also downloaded another zip file of node v10.3.0 directly from nodejs. The copy of node modules I was given are in my app folder but I am getting this error: “node : The term ‘node’ is not recognized as the name of a cmdlet, function, script file, or operable program.”

What is the correct way to get either of these modules to work in my app?

How can i change the values of the inputs on javaScript and let them be save?

    import './style.css';

let newTask;
const arrowBtn = document.getElementById('arrow');

class Todolist {
  constructor(description, completed, index) {
    this.description = description;
    this.completed = completed;
    this.index = index;
  }

  addtask(dataBase) {
    dataBase.push(this);
  }
}

arrowBtn.addEventListener('click', () => {
  const taskName = document.getElementById('input').value;
  let dataBase = JSON.parse(localStorage.getItem('baseData'));
  if (dataBase === null) {
    dataBase = [];
  }
  const index = dataBase.length + 1;
  newTask = new Todolist(taskName, false, index);
  newTask.addtask(dataBase);
  localStorage.setItem('baseData', JSON.stringify(dataBase));
  document.location.reload();
  document.preventDefault();
});

function displaytask() {
  const dataBase = JSON.parse(localStorage.getItem('baseData'));

  const unsortedList = document.querySelector('.list');

  for (let i = 0; i < dataBase.length; i += 1) {
    const list = document.createElement('li');
    list.id = i + 1;
    unsortedList.appendChild(list);

    const checkbox = document.createElement('input');
    checkbox.classList.add('check');
    checkbox.type = 'checkbox';
    list.appendChild(checkbox);

    let span = document.createElement('input');
    span.classList.add('span');
    span.type = 'text';
    span.value = dataBase[i].description;
    list.appendChild(span);

    const removeicon = document.createElement('button');
    removeicon.classList.add('remove');
    removeicon.innerHTML = '<i class="fa-solid fa-trash-can"></i>';
    list.appendChild(removeicon);

    removeicon.addEventListener('click', () => {
      dataBase.splice(i, 1);
      list.remove();
      for (let i = 0; i < dataBase.length; i += 1) {
        dataBase[i].index = i + 1;
      }
      localStorage.setItem('baseData', JSON.stringify(dataBase));
    });

    span.addEventListener('change', () => {
      if (dataBase[i].description === 'change') {
        dataBase[i].description = description.value;
      }
      localStorage.setItem('baseData', JSON.stringify(dataBase));
    })
  }  
}
displaytask();

I want to change the values of the input from the list of tasks so that these are saved both in the list and in the local storage, I try with ‘change’ events but is not work.

this is when add to the list:
[https://i.stack.imgur.com/BOT6o.png]

this is when i want to change but is not saved:
[ https://i.stack.imgur.com/ZxoW8.png]

How to allow JSON access to the text within a textarea in HTML>

I am trying to create a button that allows users to save edits to a post, which they write in a textarea, through JSON.
I am trying to save the data through a PUT request, but I get the following error:

raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

javascript function:

function save_edit(id){
    console.log("save button is clicked");
    const edit_area = document.querySelector(`#edit_area_${id}`);
    //save the post
    fetch(`/edit/${id}`,{
        method: 'PUT',
        post: JSON.stringify({
            post: edit_area.value
        })
    })
}

django.views:

def edit(request, post_id):
    try:
        post = Post.objects.get(pk=post_id)
    except Post.DoesNotExist:
        return JsonResponse({"error": "Post not found."}, status=404)

    if request.method == "POST":
        edited_post = request.POST.get('post')
        try:
            post.post = edited_post
            post.save()
        except:
            return JsonResponse({"error": "Editing the post did not work."}, status=404)

    elif request.method == "GET":
        return JsonResponse(post.serialize())

    elif request.method == "PUT":
        data = json.loads(request.body)
        edited_post = data["edit_area"]
        post.post = data["edited_post"]
        post.save()

    else:  
        return JsonResponse({"error": "Need a GET request."}, status=404)

html

{% for post in page_obj.object_list %}
            <div class = "individual_posts">
                <a href="{% url 'username' post.user %}"><h5 id="p_user" class = "post_user">{{ post.user }}</h5></a>
                <h6 id = "post_itself_{{ post.id }}" class="post_itself">{{ post.post }}</h6>
                {% if post.user == request.user %}
                    <button id="{{ post.id }}" class="edit_button" value="{{ post.id }}">Edit</button>
                {% endif %}
                <textarea class="textarea" id="edit_area_{{ post.id }}" cols="220" rows="5"></textarea>
                <button class="edit_save" id="save_{{ post.id }}">Save</button>
            </div>
        {% endfor %}

models.py serialization

def serialize(self):
        return{
            "id": self.pk,
            "post": str(self.post),
            "user": self.user.pk,
        }

The GET request works correctly, but I am receiving the previously stated error from the PUT request. I think that it is because of the way I am getting the value through edited_post = data["edit_area"]. How do I correctly get access to the text within the textarea to pass to JSON?

Convert fetch to axios

I did a ‘get’ with fetch but I want to do it with axios, could someone help me convert this code to axios?

detail: detail: I made the request to get an image, and I use the blob to be able to show this image to the user, and I would like to do that with axios as well.

Code:

 const image = (url) =>
    fetch(url)
      .then((response) => {
          return response.blob();
      })
      .then(
        (blob) =>
          new Promise((resolve, reject) => {
            const reader = new FileReader();
            reader.onloadend = () => resolve(reader.result);
            reader.onerror = reject;
            reader.readAsDataURL(blob);
          })
      );

How to recover data in number format?

I would like to recover the numbers (int) included in the tags that recover text (?innerText) for the moment. How can I do it ?

 const scraperObject = {
    url: 'https://stockx.com/fr-fr/dior-b713-cactus-jack-mocha',
    async scraper(browser){
        let page = await browser.newPage();
        console.log(`Navigating to ${this.url}...`);
        await page.goto(this.url);

        await page.waitForSelector('#onetrust-reject-all-handler');
        await page.click('#onetrust-reject-all-handler');

        const result = await page.evaluate(() => {
            //let result = [];
            let demandes = document.querySelector('#main-content > div > section:nth-child(3) > div.css-gg4vpm > div.css-0 > div.css-qt7qal > div.chakra-stack.css-1g42e87 > div > a.chakra-button.css-2zzyy5 > p').innerText;

            let offres = document.querySelector('#main-content > div > section:nth-child(3) > div.css-gg4vpm > div.css-0 > div.css-qt7qal > div.chakra-stack.css-1g42e87 > a > p').innerText;
            return {demandes, offres}
          })

          console.log(result);
          await browser
          browser.close()
          return result
    }

When i hover over the button it’s getting huge

I have just started to learn html, css and javascript. My question is when hovering over the button, its size changes and i simply dont know why. I have centralized the button settings and using it like this;

App.css file

:root {
    --yellow: #F5C32C;
    --orange: #FCA61F;
    --black: #242D49;
    --gray: #788097;
    --blueCard: #DDF8FE;
    --purple: rgb(238 210 255);
    --purpleNew: #f857a6 ;
    --boxShadow: 0px 19px 60px rgb(0 0 0 / 8%);
    --orangeCard: rgba(252, 166, 31, 0.45);
    --smboxShadow: -79px 51px 60px rgba(0, 0, 0, 0.08);
}

.App {
    padding: 0.5rem 3.5rem;
    overflow: hidden;
    color: var(--black);
}

.button {
    border-radius: 34px;
    border: none;
    color: white;
    font-size: 16px;
    padding: 11px 26px 11px 26px;
    background: linear-gradient(to right,#ff5858,#f857a6);
    box-shadow: 0 10px 10px -2px rgba(0,0,0,.25);
}
.button:hover{
    background: white;
    flex: 2;
    cursor: pointer;
    color: var(--purpleNew);
    border: 1px solid var(--purpleNew);
}

Intro.jsx file

import React from "react"
import "./Intro.css"
import Github from "../../img/github.png"
import LinkedIn from "../../img/linkedin.png"
import Instagram from "../../img/instagram.png"
import Vector1 from '../../img/Vector1.png'
import Vector2 from '../../img/Vector2.png'
import boy from '../../img/boy.png'
import thumbup from '../../img/thumbup.png'
import Crown from '../../img/crown.png'
import glassesemoji from '../../img/glassesimoji.png'
import FloatingDiv from "../FloatingDiv/FloatingDiv";
const Intro = () => {
    return (
        <div className="Intro">
            <div className="i-left">
                <div className="i-name">
                    <span>Hy! I Am</span>
                    <span>Yigit Gunes</span>
                    <span>text will be here</span>
                </div>
                <button className="button i-button">
                    Hire me
                </button>
                <div className="i-icons">
                    <img src={Github} alt="" />
                    <img src={LinkedIn} alt="" />
                    <img src={Instagram} alt="" />
                </div>

            </div>

Intro.css file

.Intro {
    display: flex;
    height: 77vh;
    margin-top: 6rem;
}

.i-left {
    display: flex;
    position: relative;
    flex: 1;
    flex-direction: column;
    gap: 2rem;
}

.i-name {
    display: flex;
    flex-direction: column;
}

.i-name > :nth-child(1) {
    color: var(--black);
    font-weight: bold;
    font-size: 3rem;
}

.i-name > :nth-child(2) {
    color: var(--purpleNew);
    font-size: 3rem;
    font-weight: bold;
}

.i-name > :nth-child(3) {
    font-weight: 100;
    font-size: 14px;
    color: var(--gray);
    margin-top: 10px;
}

.i-button {
    width: 6rem;
    height: 2rem;
    border-radius: 34px;
    border: none;
    color: white;
    font-size: 16px;
    padding: 11px 26px 11px 26px;
    background: linear-gradient(to right, #ff5858, #f857a6);
    box-shadow: 0 10px 10px -2px rgba(0, 0, 0, .25);
}

.i-right {
    flex: 1;
    position: relative;
}

.i-right > * {
    position: absolute;
    z-index: 1;
}

.i-right > :nth-child(1) {
    transform: scale(0.69);
    left: -10%;
    top: -5%;
}

.i-right > :nth-child(2) {
    top: -3.6rem;
    transform: scale(0.67);
    left: -3rem;
}

.i-right > :nth-child(3) {
    transform: scale(1.4);
    left: 14%;
}

.i-right > :nth-child(4) {
    transform: scale(0.6);
    top: -19%;
    left: -24%;
    border-radius: 50%;
    padding: 0;
}

.i-icons {
    margin-top: 3rem;
    display: flex;
    gap: 0rem;
}

.i-icons > * {
    transform: scale(0.5);
}

.i-icons > * {
    cursor: pointer;
}

.blur {
    position: absolute;
    width: 22rem;
    height: 14rem;
    border-radius: 50%;
    background: #edd0ff;
    z-index: -9;
    top: -18%;
    left: 56%;
    filter: blur(72px);
}

I want it to stay at the same size during the hover. Can you guys please help me?

Why can’t I loop over an array using map method? [closed]

I have a function that accepts an array as a parameter, when I console log it inside the function it return an array of objects. However, when I want to map over it or access one of the objects inside it it returns “undefined”. What could be the cause of this weird behavior?

function renderMovies(data) {
  console.log(data); // returns array of objects
  console.log(data[0]); // returns "undefined"
  const moviesHtml = data.map(movie) => {
    console.log(movie) // doesn't work
  }
}

Create CSS Grid with for each loop

So I found part of this code online and I am stuck the past couple hours on this simple problem. I am trying to add a property grid-row and grid-column to the cell class, because I want to add a DIV which overlaps all the cells.

This is the behavior I am currently getting:
https://svelte.dev/repl/4888e5b498a442298ca8862a68b55ee6?version=3.49.0

This is the expected working end result, but here the properties gird-row and grid-column are missing in the cell class:
https://svelte.dev/repl/8da356605a36450187cbcbcdaf4a6188?version=3.49.0

Thank you so much for helping me out!

what happen when you use onclick={} instead of onclick=””?

<script>
    function hello(val)
    {
        alert(val);
    }
</script>
<button onclick="hello('hello')"">hello</p> <!-- works and prints hello -->
<button onclick={hello()}>hello 2</button> <!-- works and prints undefined -->
<button onclick={hello("hello3")}> hello 3</button> <!--also works even though intellisence put a squigly red line under the first quote "-->
<button onclick={hello("does not work")}> hello 3</button> <!-- does not work, error is show in console Invalid or unexpected token -->

I know that inline js should be treated carefully, im trying to explain that to other people with this example, however i dont what is happening underneath.

My explnation is that if you change something that is expected you would get undesired results, however i feel that my explanation is superficial and not enough, so could someone explain what is happening underneath that is casuing this wierd behaviour?